11-04-2012 08:47 PM
I love coding in HTML/CSS and JS, I do it very often. Now my dad ask me to build an mobile app for Android, iOS and blackberry. I started on the Blackberry app yesterday, with Webworks. I came to the Google Maps part very quick. I don't use the API from google to render a map, but for calculating the distance between two points. The code is working, I tested it on my PC, it even runs in Ripple.
When I open the emulator, an BlackBerry 9930 with OS V7.1, It doesn't load the Google JS. Of course I searched the web, I added Access URI's, Features, everything. I even openen the google file, and added EVERY single url with all of the features to my config file.
When I add the Access URI maps.googleapis.com, I realised something happend. When I run the emulator, I just got an blank screen, white white white, nothing but white.
So, with an config file where you can fill an book with, and just the simple HTML file, I am nothing further.
Is there anybody, who knows, how to fix this problem. Is maps compatible with webworks? Is there an other solution for distance between to addresses (In the Netherlands, not the VS)
I hope someone has an solution for this problem, because it is getting me stressed out
11-05-2012 12:56 AM
There is a memory limit on apps and Google maps pushes the app over the memory limit.
Check out leaflet.js It enables you to include maps but reduces the overhead on the app.
11-05-2012 05:41 AM - edited 11-05-2012 06:23 AM
That's not really what I am looking for, but thanks, if I need to render maps in my pages, this is really useful.
I tried it an other way. I create an PHP script on my webserver, that downloads JSON from Google (for the distance between 2 points), and that script creates an JSON string, that the client can read. The reason I do that is dat Google doesn't support Callback for GetJSON();
It works al well on my computer, but as soon as I pack it and run it on my BlackBerry simulator, it doesn't do anything at al.
The webserver is not on localhost, I added the Access URI's to my file. It uses JQuery, and an script that allows crossdomain
I saved JQuery locally (version 1.4, also tried the newest, 1.8.2)
11-05-2012 09:06 AM
Have you tried using Web Inspector to see what's happening when your code executes, or in this case, checking the Network panel? You should be able to see your requests to the PHP script, and if it's returning a JSON string, etc. Very useful for troubleshooting this types of problems.
Here's some more info: https://developer.blackberry.com/html5/documentati