If you are using Internet Explorer, please remove blackberry.com from your compatibility view settings.

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
Trusted Contributor
milanvishal
Posts: 201
Registered: ‎12-17-2010
My Device: Not Specified

put multiple markers on map using custom MapField with Blackberry O.S - 6.0

Hello Friends, I want to set & tag multiple markers on map. so by clicking on those tags i can show the information about that location. So if any one has idea please help me out to solve this issue. Thanks & Regards
Please use plain text.
Developer
sheeluwiki
Posts: 254
Registered: ‎03-15-2011
My Device: simulator
My Carrier: simulator

Re: put multiple markers on map using custom MapField with Blackberry O.S - 6.0

In OS 6.0 , you have a field that extends MapField named as RichMapField. Below is the code that is used to display multiple location and the you can give the information that needs to be poped up in the label attribute of the MapLocation.

 

Whenever you click the pointer on the map, the value inside is poped up to the user 

 

 rMap = MapFactory.getInstance().generateRichMapField();
 mapDataModel = rMap.getModel();
 selfLoc = new MapLocation(lat_one, lon_one, "My Location", "This is my location");
 otherLoc1 = new MapLocation(lat_two, lon_two, "Two", "This is location Two");
 otherLoc2 = new MapLocation(lat_three, lon_three, "Three", "This is location Three");
 mapDataModel.add((Mappable) selfLoc );
 mapDataModel.add((Mappable) otherLoc1 );
 mapDataModel.add((Mappable) otherLoc2 );
 mainScreen.add(rMap);

 

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

Please use plain text.
New Contributor
chaitu2408
Posts: 7
Registered: ‎11-16-2011
My Device: 9800
My Carrier: airtel

Re: put multiple markers on map using custom MapField with Blackberry O.S - 6.0

hi i am able to display the map with marker.. if i click on the marker i am getting a small tranperent rectangle showing the details of the location. As per my requirment i also want to display an image in the trasparent rectangle beside the description. how to achieve this.. please help me...

Please use plain text.