Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Java Development

Reply
Contributor
koderkid
Posts: 15
Registered: ‎04-27-2011
My Device: Storm 2-9550

How to display multi cursors on the google map and set each cursor's information such as ("I'm here") and get their information when clicked ?

Hi all,

Can anybody show me how tho display a Google map with multi point on ? And another problem is how i can set 2 or more cursors on that :smileysad: i don't like BlackberryMap so thanks so much if you can teach me how to use google map on blackberry Application.

 

Kid

Developer
simon_hain
Posts: 16,282
Registered: ‎07-29-2008
My Device: Z10 LE, Z30, Passport

Re: How to display multi cursors on the google map and set each cursor's information such as ("I'm here") and get their information when clicked ?

google maps is a third party application, RIM does not (and cannot) provide an API for it.

you can ask google or try to use google maps in a browser (as there is a public API for it)

----------------------------------------------------------
feel free to press the like button on the right side to thank the user that helped you.
please mark posts as solved if you found a solution.
@SimonHain on twitter
Contributor
koderkid
Posts: 15
Registered: ‎04-27-2011
My Device: Storm 2-9550

Re: How to display multi cursors on the google map and set each cursor's information such as ("I'm here") and get their information when clicked ?

Thank you, simon.
Developer
sheeluwiki
Posts: 254
Registered: ‎03-15-2011
My Device: simulator

Re: How to display multi cursors on the google map and set each cursor's information such as ("I'm here") and get their information when clicked ?

You can use KML file to show one or more point of interest in google maps. The KML file that you have should be uploaded in a webserver publically available for google to access. But as Simon told, you don´t have any API for that. Here is the sample code for your reference. You need to have google maps installed to make this work.

 

int mh = CodeModuleManager.getModuleHandle("GoogleMaps");
     if (mh == 0) {
      try {
       throw new ApplicationManagerException(
         "GoogleMaps isn't installed");
      } catch (ApplicationManagerException e) {
       System.out.println(e.getMessage());
      }
     }
     String[] args = {"Your KML file with .kml extension"};//PUT THE SAVED FILE URL OVER HERE IN DOUBLE QUOTES  
     ApplicationDescriptor ad = CodeModuleManager
       .getApplicationDescriptors(mh)[0];
     ApplicationDescriptor ad2 = new ApplicationDescriptor(ad, args);
     try {
      ApplicationManager.getApplicationManager()
        .runApplication(ad2, true);
     } catch (ApplicationManagerException e) {
      System.out.println(e.getMessage());
     }

 

------------------------------------------------------------------------------------------------
Click "Accept as Solution" if post was what you needed. Give kudos if you feel response is helpful.

Contributor
koderkid
Posts: 15
Registered: ‎04-27-2011
My Device: Storm 2-9550

Re: How to display multi cursors on the google map and set each cursor's information such as ("I'm here") and get their information when clicked ?

Thanks for your example,sheeluwiki :smileyhappy:.