开发者

Invoking google Map

开发者 https://www.devze.com 2023-01-04 11:50 出处:网络
I am using the following code to invoke Google map in my simulator. i have already installed Google map in my simulator.

I am using the following code to invoke Google map in my simulator. i have already installed Google map in my simulator.

int mh = CodeModuleManager.getModuleHandle("GoogleMaps");
        if(mh > 0) {
    try{
URLEncodedPostData uepd = new URLE开发者_运维百科ncodedPostData(null, false);
uepd.append("action","LOCN");
uepd.append("a", "@latlon:"+lat+","+log);
uepd.append("title","Stanford University School of Medicin");
uepd.append("description", "XYZ");
String[] args = { "http://gmm/x?"+uepd.toString() };
ApplicationDescriptor ad = CodeModuleManager.getApplicationDescriptors(mh)[0];
ApplicationDescriptor ad2 = new ApplicationDescriptor(ad, args);
ApplicationManager.getApplicationManager().runApplication(ad2, true);
}catch(Exception e){
System.out.println(e+"Excepton");
}}}

but i am getting a white screen , when i am pressing the menu button RUN GMAPS option is their. but when i am pressing the RUN GMAPS then also result is same only white screen is coming. i don't why it is coming. some one please help me out

i also want to Know. how to pin multiple places in google map.

thanks in advance


i think you should use kml file.

BrowserSession visit = Browser.getDefaultSession();
visit.displayPage("http://www.geochemie.uni-bremen.de/kml/borabora.kml");

you can test on simulator also.

0

精彩评论

暂无评论...
验证码 换一张
取 消