How to show Location on Map in Blackberry
Here is some code to show your location on map according to latitude and longitude of your location:
RichMapField map = MapFactory.getInstance().generateRichMapField();MapDataModel data = map.getModel();
MapLocation currentLocation = new MapLocation( 28.635308, 77.224960,"New Delhi", null );
int locationId = data.add( (Mappable) currentLocation, "location" );
data.tag( locationId, "location" );
data.setVisibleNone();
data.setVisible( "location" );
map.getMapField().update(true);
Then add map field in your manager.
No comments:
Post a Comment