View Single Post
  (#1 (permalink)) Old
RemyJ Offline
CrackBerry Addict
 
Posts: 671
Join Date: May 2005
Location: Golden, CO US
Model: 9630
Carrier: VZW
Default Here's how to start Google Maps with a landmark - 08-02-2008, 11:24 AM

Just FYI...

Basically, you start GoogleMaps with a URL like so...
Code:
http://gmm/x?action=LOCN&a=@latlon:35.0000,-105,0000&title=something&description=something
Code:
int mh = CodeModuleManager.getModuleHandle("GoogleMaps");
if (mh == 0) {
     throw new ApplicationManagerException("GoogleMaps isn't installed");
}
URLEncodedPostData uepd = new URLEncodedPostData(null, false);
uepd.append("action","LOCN");
uepd.append("a", "@latlon:"+l.getLatitude()+","+l.getLongitude());
uepd.append("title", l.getName());
uepd.append("description", l.getDescription());
String[] args = { "http://gmm/x?"+uepd.toString() };
ApplicationDescriptor ad = CodeModuleManager.getApplicationDescriptors(mh)[0];
ApplicationDescriptor ad2 = new ApplicationDescriptor(ad, args);
ApplicationManager.getApplicationManager().runApplication(ad2, true);
There are other actions and other ways to specify location but I'm still sifting through them.

Last edited by RemyJ : 08-02-2008 at 11:26 AM.
   
Reply With Quote
Sponsored Links
Please Login or Register to Remove these Advertisements!