开发者

Implementing Blackberry Maps with MapLocation

开发者 https://www.devze.com 2023-02-23 10:13 出处:网络
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 la

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.


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 );

0

精彩评论

暂无评论...
验证码 换一张
取 消