使用MapLocation实现Blackberry Maps

时间:2011-04-09 11:10:32

标签: blackberry blackberry-maps

我想在我的应用程序中显示带有标记的黑莓地图。我尝试使用net.rim.device.api.lbs.maps.ui.MapField,但它会抛出IllegalArgumentException(Bitmap is too large)

任何人都尝试实施net.rim.device.api.lbs.maps.ui.MapField并使用MappableMapLocation设置模型以显示各种位置?

我要做的就是显示带有多个位置标记的地图。点击标记后,它应显示该位置的详细信息屏幕。

1 个答案:

答案 0 :(得分:0)

RichMapField map = MapFactory.getInstance()。generateRichMapField();
MapDataModel modelMap = map.getModel();
//您的位置
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);