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
MFSI
Posts: 80
Registered: ‎09-03-2012
My Carrier: Vodafone

Re: Show multiple pin point on google map in blackberry

Hi avinash i did used your this code

 

but its only showing one pointer (Vijaynagar). No multiple pointers . Do we require to make any changes in code for showing multiple pointers.

 

 

Thanks

Always Success
Please use plain text.
Developer
avinash_kumar_ispg_in
Posts: 172
Registered: ‎01-02-2012
My Carrier: compny

Re: Show multiple pin point on google map in blackberry

Hi MFSI

  actually i don't have device with os 5 now,But I just checked it in os7 device it is working fine.it is showing multiple points.So I think no need to change any thing in this code.

 

 if you want just increase and decrease the zoom and check.

Please use plain text.
Developer
MFSI
Posts: 80
Registered: ‎09-03-2012
My Carrier: Vodafone

Re: Show multiple pin point on google map in blackberry

Thanks Avinash for all the help.

 

It is running fine on my device with OS 7.0 .

 

One more thing that I observed with the map is that on multiple taps on pins sometime make app crash.

Did you ever got it at your side ? What could be the reason for this ?

Always Success
Please use plain text.
Developer
avinash_kumar_ispg_in
Posts: 172
Registered: ‎01-02-2012
My Carrier: compny

Re: Show multiple pin point on google map in blackberry

Hi MFSI

 

actually I dint faced this ever But if it is coming for you ,it may be memory issue just try to clear the stack every time in your app.

 

  

 

Thanks

Please use plain text.
Contributor
Napolean
Posts: 11
Registered: ‎11-28-2012
My Carrier: Vodafone

Re: Show multiple pin point on google map in blackberry

Hi All

 

I want to show multiple pins in devices and simulator with OS 6.0 and above using Google maps App installed in device and simulators.

I am able to show a single pin (location) using Google Map app. But not able to show multiple points.

 

I also dont want to use the BrowserField to show maps in form of html content.

 

I am implementing it as follows :



int gmm = CodeModuleManager.getModuleHandle("GoogleMaps");
				String glat = String.valueOf(28);
				String glon = String.valueOf(77);
				URLEncodedPostData uepd = new URLEncodedPostData(null, false);
				uepd.append("action", "LOCN");
				uepd.append("a", "@latlon:" + glat + "," + glon);
				String strTitle = "New Delhi";
				String strDescription = "My Delhi";
				uepd.append("title", strTitle);
				uepd.append("description", strDescription);

				URLEncodedPostData uepd1 = new URLEncodedPostData(null, false);
				uepd1.append("action", "LOCN");
				uepd1.append("a", "@latlon:" + 20 + "," + 77);
				String strTitle1 = "Mumbai";
				String strDescription1 = "My Mumbai";
				uepd1.append("title", strTitle1);
				uepd1.append("description", strDescription1);

				String[] args = {"http://gmm/x?" + uepd.toString(), "http://gmm/x?" + uepd1.toString()};
				ApplicationDescriptor ad = CodeModuleManager.getApplicationDescriptors(gmm)[0];
				ApplicationDescriptor ad2 = new ApplicationDescriptor(ad, args);
				try
				{
					ApplicationManager.getApplicationManager().runApplication(ad2, true);
				}
				catch (ApplicationManagerException e)
				{
					Dialog.alert("Could not start Google Maps: " + e.getMessage());
					e.printStackTrace();
					System.exit(0);
				}
				catch (Exception e)
				{
					Dialog.alert("Could not start Google Maps: " + e.getMessage());
					e.printStackTrace();
					System.exit(0);
				}

 

 

Is this possible and if it is , then where am i making mistake ?

 

Please help .

 

 

 

 

 

 

Please use plain text.
Developer
rakesh86shankar
Posts: 979
Registered: ‎05-22-2009

Re: Show multiple pin point on google map in blackberry

Hi,

 

I was not able to show multipoints in the way as you suggessted,I was able to show a single point or route map in the application.

 

Thanks

Rakesh Shankar

Please use plain text.
Developer
avinash_kumar_ispg_in
Posts: 172
Registered: ‎01-02-2012
My Carrier: compny

Re: Show multiple pin point on google map in blackberry

Hi

 

Through installed google map api i was not able  to display the multiple pin point

 

you can go through browser field the code example is given in this blog with date and time 02-09-201207:00 AM

 

http://supportforums.blackberry.com/t5/Java-Development/Show-multiple-pin-point-on-google-map-in-bla...

 

if any query you put your separate thread i will sugest you the new code or idea.

 

thanks

 

if got the solution please fill free to like this...

Please use plain text.
Contributor
Napolean
Posts: 11
Registered: ‎11-28-2012
My Carrier: Vodafone

Re: Show multiple pin point on google map in blackberry

Hi Rakesh

 

Thanks for replying so quick.

It means if I need to show multiple points , I will need to implement GoogleMaps using BrowserField and showing as html content.

 

 

Please use plain text.
Contributor
Napolean
Posts: 11
Registered: ‎11-28-2012
My Carrier: Vodafone

Re: Show multiple pin point on google map in blackberry

 

Hi Avinash

 

Thanks for replying.

I tried your code that shows html content in BrowserField. That worked too but it is not as good as Google Maps app .

Problems I found :

 

1. It loads very slow.

2. Inbuilt Zoom controls are not working properly and on zoom action , the black patches appear before showing zoomed map. ( not that UI friendly).

3. Do not appear in Fullscreen  mode.

4. Also got a crash on multiple touch on map

 

Have you done experiment on showing maps using  Google Maps app ?

 

Please use plain text.
Developer
avinash_kumar_ispg_in
Posts: 172
Registered: ‎01-02-2012
My Carrier: compny

Re: Show multiple pin point on Google map in blackberry

Hi Napolean

 

 here is the answer 

 

1. It loads very slow.

 

Ans- because google map have too much data so for loading that it takes time,  not only in mobile even it is on desktop computer also.

 

2. Inbuilt Zoom controls are not working properly and on zoom action , the black patches appear before showing zoomed map. ( not that UI friendly).

 

Ans- Every thing regarding ui and zooming the google only providing, So if it is we can't do any thing.

 

3. Do not appear in Fullscreen  mode.

 

Ans- it can appear full screen mode just set the value here

 through JavaScript 

 

  "  <script src=\"http://maps.google.com/maps/api/js?sensor=false\" \r\n" +
                    "          type=\"text/JavaScript\"></script>\r\n" +
                    "</head> \r\n" +
                    "<body>\r\n" +
                    "  <div id=\"map\" style=\"width: 500px; height: 400px;\"></div>\r\n" +
                    "\r\n" +
                    "  <script type=\"text/javascript\">\r\n" +
                    "    var locations = [";

 

Here change width:500px and height:400px to some other value in respect your screen.

 

4. Also got a crash on multiple touch on map

 

Ans- this will happen because each device having limited memory for particular app but Google map required more memory to navigate it more. To avoid this you can go for blackberry map.

 

 

  Note:- I have not done any more experiment with installed Google map on device so if you need can go ahead.

 

Thanks.

 

 

If got the solution please fill free to like this...

 

Please use plain text.