使用 MapLocation 实现黑莓地图
我想在我的应用程序中显示带有各个位置标记的黑莓地图。我尝试使用 net.rim.device.api.lbs.maps.ui.MapField
但它抛出 IllegalArgumentException(Bitmap 太大)
任何人都尝试过实现 net .rim.device.api.lbs.maps.ui.MapField
并使用 Mappable
或 MapLocation
设置模型以显示各种位置?
我想做的就是显示带有多个位置标记的地图。单击标记后,它应该显示该位置的详细信息屏幕。
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.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
RichMapField map = MapFactory.getInstance().generateRichMapField();
MapDataModel modelMap = map.getModel();
// 您的位置
MapLocation julieHome = new MapLocation( 43.47751, -80.54817,"朱莉 - 家", null );
int julieHomeId = modelMap.add( (Mappable) julieHome, "julie" );
MapLocation paulHome = new MapLocation( 43.47551, -80.55335, "保罗 - 家", null );
int paulHomeId = modelMap.add( (Mappable) paulHome, "paul" );
map.getMapField().update(true);
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 );