Blackberry GPS and BlackBerry Maps Handbuch - Seite 25
Blättern Sie online oder laden Sie pdf Handbuch für Software Blackberry GPS and BlackBerry Maps herunter. Blackberry GPS and BlackBerry Maps 35 Seiten. Version: 4.7.0
Development Guide
menu.setDefault(1);
}
}
View a sample application that starts a BlackBerry Application from BlackBerry Maps
1.
From the BlackBerry® Integrated Development Environment, launch the BlackBerry Smartphone Simulator.
2.
In the BlackBerry Smartphone Simulator, launchBlackBerry Maps.
3.
In BlackBerry Maps, click Menu Item Demo.
4.
Complete the instructions on the screen and click View Map.
Displaying location information in your application
A BlackBerry® device application can use the MapField class to display a map in a UI field. For a BlackBerry device application
to use the MapField class, BlackBerry® Maps must be installed on the BlackBerry device and the BlackBerry device must be
able to download data from the map server for location-based services.
A MapField gets data either from a map server for location-based services or the BlackBerry device with BlackBerry Maps
installed. If location information is not present on the BlackBerry device, the MapField requests data from the map server.
See the API reference for the BlackBerry Java Development Environment for more information about the MapField API.
Work with a map that displays in a UI field
1.
Import the net.rim.device.api.lbs.MapField class.
2.
Invoke any of the following methods:
Task
Modify the center of a
MapField using latitudinal
and longitudinal values, in
degrees.
Modify the center of a
MapField to specific
coordinates.
Steps
Invoke moveTo(int latitude, int longitude). The latitude
and longitude values are calculated as degrees multiplied by 100,000.
Invoke moveTo(javax.microedition.
location.Coordinates coords).
Displaying location information in your application
23