Help Center

Local Navigation

Open BlackBerry Maps to display a custom map view

A MapView object represents the view that BlackBerry® Maps displays. The MapView object contains the latitude and longitude values that BlackBerry Maps uses as the center of the map, and the zoom and rotation values for the map that BlackBerry Maps displays.

  1. Import the following classes:
    • net.rim.blackberry.api.invoke.Invoke
    • net.rim.blackberry.api.maps.MapView
  2. Create an instance of a MapView object.
    MapView mapView = new MapView();
  3. Modify the latitude, longitude, and zoom values for the MapView object.
    mapView.setLatitude(4331168);
    mapView.setLongitude(-8055339);
    mapView.setZoom(10);
    
  4. Invoke invokeApplication() using the APP_TYPE_MAPS constant parameter and a new MapsArguments object that uses the MapView object that you created.
    Invoke.invokeApplication(Invoke.APP_TYPE_MAPS, new MapsArguments(mapView));

Was this information helpful? Send us your comments.