Blackberry JAVA DEVELOPMENT ENVIRONMENT - - GPS AND MAPS - DEVELOPMENT GUIDE Bedienungsanleitung Seite 22

  • Herunterladen
  • Zu meinen Handbüchern hinzufügen
  • Drucken
  • Seite
    / 30
  • Inhaltsverzeichnis
  • LESEZEICHEN
  • Bewertet. / 5. Basierend auf Kundenbewertungen
Seitenansicht 21
For RIM and BlackBerry partner use only. Beta documentation. Content and software are subject to change.
22
GPS and BlackBerry Maps Development Guide
3. Open the menu and click Invoke Location Document.
4. Open the menu and click View Route. BlackBerry® Maps displays the following map:
5. To view tracking information from one location to another, from the application menu, select Directions.
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 that BlackBerry Maps uses as the center of the map that it displays and the zoom for the map that
it displays.
1. Import the net.rim.blackberry.api.maps.MapView class.
import net.rim.blackberry.api.maps.MapView;
2. Create an instance of a MapView.
MapView mapView = new MapView();
3. Set 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
MapView object you created.
Invoke.invokeApplication(Invoke.APP_TYPE_MAPS, new MapsArguments(mapView));
View a sample application that displays a custom map view
1. From the BlackBerry® Integrated Development Environment, start the BlackBerryMapsDemo project.
2. In the BlackBerry Smartphone Simulator, click BlackBerry Maps Demo.
3. Open the menu and click Invoke Map View.
4. Open the menu and click View Map.
Seitenansicht 21
1 2 ... 17 18 19 20 21 22 23 24 25 26 27 28 29 30

Kommentare zu diesen Handbüchern

Keine Kommentare