Skip to content

Instantly share code, notes, and snippets.

@jemerick
Created April 5, 2010 04:25
Show Gist options
  • Save jemerick/356023 to your computer and use it in GitHub Desktop.
Save jemerick/356023 to your computer and use it in GitHub Desktop.
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);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment