Open BlackBerry Maps by using specific coordinates
You can open BlackBerry Maps to display a location on a map by providing the coordinates for the latitude and longitude of a location and by specifying the zoom and rotation values. The zoom values have a range of 0 to MapView.MAX_ZOOM. The rotation values are expressed in degrees to rotate the map from north facing up, and have a range of 0 to 359.
Code sample: Invoking BlackBerry Maps by using specific coordinates
import net.rim.blackberry.api.invoke.*;
import net.rim.blackberry.api.maps.*;
public class invokeMaps
{
public invokeMaps()
{
MapView mapView = new MapView();
mapView.setLatitude(4328915);
mapView.setLongitude(-8032480);
mapView.setZoom(10);
MapsArguments mapsArgs = new MapsArguments(mapView);
Invoke.invokeApplication(Invoke.APP_TYPE_MAPS, mapsArgs);
}
}
Next topic: Open BlackBerry Maps by using a landmark
Previous topic: Open BlackBerry Maps by using information from a contact