Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Web and WebWorks Development

New Contributor
Posts: 3
Registered: ‎11-04-2012
My Device: Blackberry 9900 (EMU)
My Carrier: Vodafone

Using Google Maps in Webworks

Dear Users,


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



Posts: 322
Registered: ‎08-06-2012
My Device: Dev Alpha / Playbook / Curve 9300

Re: Using Google Maps in Webworks

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.



If it helped you, click like. Smiley Happy
New Contributor
Posts: 3
Registered: ‎11-04-2012
My Device: Blackberry 9900 (EMU)
My Carrier: Vodafone

Re: Using Google Maps in Webworks

[ Edited ]

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)


see: http://supportforums.blackberry.com/t5/Web-and-WebWorks-Development/JSON-works-on-BB-Browser-not-in-...

BlackBerry Development Advisor
Posts: 769
Registered: ‎10-01-2009
My Device: All
My Carrier: N/A

Re: Using Google Maps in Webworks



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/documentation/web_inspector_overview_1553586_11.html