views:

29

answers:

1

Hi

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 URLEncodedPostData(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

A: 

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.

Vivart