BlackBerry MapField

时间:2013-04-02 09:24:56

标签: java blackberry blackberry-maps

使用BlackBerry MapField

问题

这是我用来显示地图的代码:

class MapScreen extends FullScreen
{
    public MapScreen() 
    {
        super( FullScreen.DEFAULT_CLOSE | FullScreen.DEFAULT_MENU );
        MapField map = new MapField();
        MapAction action = map.getAction();
        action.setCentreAndZoom(new MapPoint(40, -40), 3);   
        add(map);
    }
}

但只有地图图块出现在屏幕上。请帮忙。

1 个答案:

答案 0 :(得分:0)

试试这个 -

MapField mMapField;
Coordinates mCoordinates;
mCoordinates = new Coordinates( -25.900461, 28.135085, 0);
mMapField = new MapField();
mMapField.moveTo(mCoordinates);
add(mMapField);