Implementing Blackberry Maps with MapLocation

416 views Asked by At

I want to display blackberry maps with markers for various location within my application. I tried using net.rim.device.api.lbs.maps.ui.MapField but it throws IllegalArgumentException(Bitmap is too large)

Anyone has tried implementing net.rim.device.api.lbs.maps.ui.MapField and setting the model with Mappable or MapLocation to display various locations?

All i'm trying to do is display map with multiple location markers. On click of markers it should display a details screen for that location.

1

There are 1 answers

0
Pachuco Digital On

RichMapField map = MapFactory.getInstance().generateRichMapField();
MapDataModel modelMap = map.getModel();
// Your Locations
MapLocation julieHome = new MapLocation( 43.47751, -80.54817,"Julie - Home", null );
int julieHomeId = modelMap.add( (Mappable) julieHome, "julie" );
MapLocation paulHome = new MapLocation( 43.47551, -80.55335, "Paul - Home", null );
int paulHomeId = modelMap.add( (Mappable) paulHome, "paul" );
map.getMapField().update( true );