Created
April 5, 2010 04:25
-
-
Save jemerick/356023 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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