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


Thank you for visiting the BlackBerry Support Community Forums.

BlackBerry will be closing the BlackBerry Support Community Forums Device Forums on April 1st (Developers, see below)

BlackBerry remains committed to providing excellent customer support to our customers. We are delighted to direct you to the CrackBerry Forums, a well-established and thorough support channel, for continued BlackBerry support. Please visit http://forums.crackberry.com or http://crackberry.com/ask. You can also continue to visit BlackBerry Support or the BlackBerry Knowledge Base for official support options available for your BlackBerry Smartphone.

"When we launched CrackBerry.com 10 years ago, we set out to make it a fun and useful destination where BlackBerry Smartphone owners could share their excitement and learn to unleash the full potential of their BlackBerry. A decade later, the CrackBerry community is as active and passionate as ever and I know our knowledgeable members and volunteers will be excited to welcome and assist more BlackBerry owners with their questions."

- Kevin Michaluk, Founder, CrackBerry.com

Developers, for more information about the BlackBerry Developer Community please review Join the Conversation on the BlackBerry Developer Community Forums found on Inside BlackBerry.


Reply
Trusted Contributor
Posts: 236
Registered: ‎07-28-2010
My Device: Not Specified
My Carrier: Software Developer
Accepted Solution

how to show pin on bb map using 5.0 API

Hi All ,

               I am developing an application for that i am showing map and writng following code

but it is not showing Pin on that map for 5.0 API O.S level.

 

 

        MapView mapView = new MapView();
        double lat=Double.parseDouble(ifAgentSearchInfo.getLatitude())*100000;
        int latInt=(int)lat;
        double lot=Double.parseDouble(ifAgentSearchInfo.getLongitude())*100000;
        int lotInt=(int)lot;            
        mapView.setLatitude(latInt);
        mapView.setLongitude(lotInt);
        mapView.setZoom(2);


        MapsArguments mapsArgs = new MapsArguments(mapView);
        Invoke.invokeApplication(Invoke.APP_TYPE_MAPS, mapsArgs);

 

 

 

Thanks to All

Trusted Contributor
Posts: 236
Registered: ‎07-28-2010
My Device: Not Specified
My Carrier: Software Developer

Re: how to show pin on bb map using 5.0 API

can anyone give me the answer...............

Developer
Posts: 104
Registered: ‎08-03-2010
My Device: Blackberry Z10
My Carrier: Idea

Re: how to show pin on bb map using 5.0 API

See the demo of Embeded map in Sample program of 5.0 API.

It will give the idea of hoe to display pin in Embeded MAp.

You can add more than pin in to it..

 

If not understand than reply me i will tell you..


Please mark posts as solved if you found a solution.
Feel free to press the kudos button to thank the user that helped you
Highlighted
Trusted Contributor
Posts: 236
Registered: ‎07-28-2010
My Device: Not Specified
My Carrier: Software Developer

Re: how to show pin on bb map using 5.0 API

HI Rajeshkparmar,

                                    I am not getting in embeded map demo because my code is entirely defferent as following

 

MapView mapView = new MapView();
        double lat=Double.parseDouble(ifAgentSearchInfo.getLatitude())*100000;
        int latInt=(int)lat;
        double lot=Double.parseDouble(ifAgentSearchInfo.getLongitude())*100000;
        int lotInt=(int)lot;            
        mapView.setLatitude(latInt);
        mapView.setLongitude(lotInt);
        mapView.setZoom(2);
        MapsArguments mapsArgs = new MapsArguments(mapView);
        Invoke.invokeApplication(Invoke.APP_TYPE_MAPS, mapsArgs);

 

 

above code is showing bb default map but it is not showing pin on that map

 

 

Thanks       

 

 

Developer
Posts: 104
Registered: ‎08-03-2010
My Device: Blackberry Z10
My Carrier: Idea

Re: how to show pin on bb map using 5.0 API

hi,

It seems like you are using inbulit Map by passing argument..

 

String document1 = "<lbs clear='Locations'>" + "<location x='"
                        + lon1 + "' y='" + lat1   />"
                        + "</lbs>";
                Invoke.invokeApplication(Invoke.APP_TYPE_MAPS,
                        new MapsArguments(MapsArguments.ARG_LOCATION_DOCUMENT,
                                document1));

 

Used lat1 lon1 as you Lat Lon..

 

Regards

Rajesh Parmar


Please mark posts as solved if you found a solution.
Feel free to press the kudos button to thank the user that helped you
Trusted Contributor
Posts: 236
Registered: ‎07-28-2010
My Device: Not Specified
My Carrier: Software Developer

Re: how to show pin on bb map using 5.0 API

hi  Rajesh i got the solution for this but one more thinf i want to ask you,

how to display more than 2 (e.g- 10-20) pins on bb default map, whose lat , long values are coming from server

i am using GetRoute tag from XML  nad passing that in mapargument

 

 

 

Thanks  & Regards

Mansingh

Developer
Posts: 104
Registered: ‎08-03-2010
My Device: Blackberry Z10
My Carrier: Idea

Re: how to show pin on bb map using 5.0 API

add more location in String

 

like this

 

"<location lat='-7569792' lon='4542349' address='Ottawa, ON, CANADA'/>"
+ "<location lat='-7938675' lon='4367022' address='Toronto, ON, CANADA'/>"

 

 


Please mark posts as solved if you found a solution.
Feel free to press the kudos button to thank the user that helped you
Developer
Posts: 202
Registered: ‎04-19-2011
My Device: Blackberry Bold 9780
My Carrier: TAM

Re: how to show pin on bb map using 5.0 API

Sorry, if i'm posting here..

But, i want to ask about invoke blackberry maps too

How to set default zoom in lbs documet..

Also, i want to set the first location to be centered in blackberry maps..

 

Sorry if my english language is poor...

Thanx