Welcome!

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

Java Development

Reply
New Developer
Posts: 8
Registered: ‎02-20-2009
My Device: Not Specified

Blackberry app which calls google maps - API working for location points

It is possible to call Google maps from another blackberry - the following format works.  

 

http://gmm/x?action=LOCN&a=@latlon:35.0000,-105,0000&title=something&description=something

 

I have done this successfully but I am desperately trying to figure out how to send a route rather than a single location to google maps.

 

Anyone got any suggestions?

 

Thank you

Developer
Posts: 3,951
Registered: ‎07-15-2008
My Device: Not Specified

Re: Blackberry app which calls google maps - API working for location points

I dn't think google released any API's for developers to use from java applications. Google, if anyone cracked it using some trials.

 


Use Search. "Accept Solution" If the problem is resolved.
Developer
Posts: 16,992
Registered: ‎07-29-2008
My Device: Z10 LE, Z30, Passport
My Carrier: O2 Germany

Re: Blackberry app which calls google maps - API working for location points

how about monitoring the google maps traffic to check for another parameter?

here is the original thread about calling google maps btw:
http://www.blackberryforums.com/developer-forum/143263-here-s-how-start-google-maps-landmark.html
----------------------------------------------------------
feel free to press the like button on the right side to thank the user that helped you.
please mark posts as solved if you found a solution.
@SimonHain on twitter
New Developer
Posts: 8
Registered: ‎02-20-2009
My Device: Not Specified

Re: Blackberry app which calls google maps - API working for location points

Thanks guys - would love to know how to monitor the traffic from google maps.  Can you shed some light on how I could do this.

 

For info ... the following code works when you import all of the following class libraries.

 

import net.rim.blackberry.api.invoke.Invoke;
import net.rim.blackberry.api.invoke.MapsArguments;
import net.rim.device.api.system.CodeModuleManager;
import net.rim.device.api.system.ApplicationManagerException;
import net.rim.device.api.system.ApplicationManager;
import net.rim.device.api.system.ApplicationDescriptor;
import net.rim.blackberry.api.browser.URLEncodedPostData;
import net.rim.blackberry.api.invoke.MessageArguments;

int gmm = CodeModuleManager.getModuleHandle("GoogleMaps");
String glat = String.valueOf(lat/100000);
String glon = String.valueOf(lon/100000);
URLEncodedPostData uepd = new URLEncodedPostData(null, false);
uepd.append("action","LOCN");
uepd.append("a", "@latlon:"+glat+","+glon);
uepd.append("title", strTitle);
uepd.append("description", strDescription);
String[] args = { "http://gmm/x?"+uepd.toString() };
ApplicationDescriptor ad = CodeModuleManager.getApplicationDescriptors(gmm)[0];
ApplicationDescriptor ad2 = new ApplicationDescriptor(ad, args);
try{
ApplicationManager.getApplicationManager().runApplication(ad2, true);
 }
catch (ApplicationManagerException e) {
Dialog.alert("Could not start Google Maps: " + e.getMessage());
e.printStackTrace();
}

 

I am a total novice at this ... perhaps one of the experts out there could help figure out on of the best kept secrets on the web ... the google maps for mobile api!!!!

 

Kind regards

 

Adrian

 

Highlighted
Developer
Posts: 16,992
Registered: ‎07-29-2008
My Device: Z10 LE, Z30, Passport
My Carrier: O2 Germany

Re: Blackberry app which calls google maps - API working for location points

if you use the MDS simulator you should be able to trace some. or use WLAN and a network sniffer.
----------------------------------------------------------
feel free to press the like button on the right side to thank the user that helped you.
please mark posts as solved if you found a solution.
@SimonHain on twitter