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
Developer
shashankkushwah
Posts: 49
Registered: ‎08-25-2009
My Device: Not Specified

set multiple marker in google maps.

Hi all,

 

I need to use the map with multiple marker and blackberry map doesn't seems a good option as it support very few regions and I heard about invoking the google maps from the application using the KML for multiple markers.  Anybody know how to do that? Please give me code how to use use the KML with google maps.

Please use plain text.
Developer
shashankkushwah
Posts: 49
Registered: ‎08-25-2009
My Device: Not Specified

Re: set multiple marker in google maps.

NO body know??

 

Is it possible or not..............!??

Please use plain text.
New Developer
rodrifox
Posts: 35
Registered: ‎12-22-2009
My Device: Bold 9700

Re: set multiple marker in google maps.

Hi... it seems the best option is to use BB Maps since the new Google API is not supported (it requires some ajax features not available yet on BB browsers). I tried the Google Static Maps also but I've run into some issues when trying to use KML for multiple markers.

 

Have you found any other alternative?

 

Thanks....

-------------
Rodrigo Bravo
http://www.wilkonit.com
Please use plain text.
Developer
RexDoug
Posts: 4,764
Registered: ‎07-21-2008
My Device: Not Specified

Re: set multiple marker in google maps.

The actual google maps app can be launched on the Blackberry with parameters, but I have not figured out how to pass multiple locations.

 

For one location, however, it works well.

 

Search the forum for "google maps" and you should find the post with sample code.

 

Please use plain text.
New Developer
rodrifox
Posts: 35
Registered: ‎12-22-2009
My Device: Bold 9700

Re: set multiple marker in google maps.

Thks RexDoug; I've the sample code to launch Google Maps. But I'm also having troubles when dealing with multiple locations markers. Maybe the best alternative for now is to use the BB Maps and wait for the embedded BrowserField to support the JS/Ajax of Google Maps V3 API. :smileysad:

-------------
Rodrigo Bravo
http://www.wilkonit.com
Please use plain text.
Developer
shashankkushwah
Posts: 49
Registered: ‎08-25-2009
My Device: Not Specified

Re: set multiple marker in google maps.

 

public void invokeGMaps() {		

		int module = CodeModuleManager.getModuleHandle("GoogleMaps");
		if (module == 0) {
			try {
				throw new ApplicationManagerException(
						"GoogleMaps isn't installed");
			} catch (ApplicationManagerException e) {
				System.out.println(e.getMessage());
			}
		}
		String[] args = {"Your kml file url"}; 
	ApplicationDescriptor descriptor = CodeModuleManager
				.getApplicationDescriptors(module)[0];
		ApplicationDescriptor ad2 = new ApplicationDescriptor(descriptor, args);
		try {
			ApplicationManager.getApplicationManager()
					.runApplication(ad2, true);
		} catch (ApplicationManagerException e) {
			System.out.println(e.getMessage());
		}
	}

 

 

this is how you can open google maps with multiple markers using the kml file.

 

Please use plain text.
New Developer
rodrifox
Posts: 35
Registered: ‎12-22-2009
My Device: Bold 9700

Re: set multiple marker in google maps.

Thanks!! I will try that now.

-------------
Rodrigo Bravo
http://www.wilkonit.com
Please use plain text.
Developer
mrtrav
Posts: 37
Registered: ‎10-20-2010
My Device: 9550

Re: set multiple marker in google maps.

Digging up an old thread here, but trying to find an answer. 

 

I am able to get this to work just fine if the KML file is static.  However I am building the KML file via PHP.  When I try to load the KML which the PHP is outputting, nothing displays in google maps.

 

Anyone trying this?

Please use plain text.