Map field
Use a map field to display a map in a BlackBerry device application.
Class
Supported since
BlackBerry Java SDK 6.0
More information
For more information about map fields and location-based services, see the Location-Based Services Development Guide.
Example
import net.rim.device.api.lbs.maps.model.*;
import net.rim.device.api.lbs.maps.ui.*;
import net.rim.device.api.ui.*;
import net.rim.device.api.ui.container.*;
public class MapFieldDemo extends UiApplication
{
public static void main(String[] args)
{
MapFieldDemo theApp = new MapFieldDemo();
theApp.enterEventDispatcher();
}
public MapFieldDemo()
{
pushScreen(new MapScreen());
}
}
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(43.46518, -80.52237), 3);
add(map);
}
}