Blackberry GPS and BlackBerry Maps Manual - Page 15

Browse online or download pdf Manual for Software Blackberry GPS and BlackBerry Maps. Blackberry GPS and BlackBerry Maps 35 pages. Version: 4.7.0

Development Guide

Open BlackBerry Maps to display a location on a map

1.
Import the following classes:
• net.rim.blackberry.api.invoke.Invoke
• net.rim.blackberry.api.invoke.MapsArguments
2.
Create a String that contains location information for one location.
String document = "<location-document><location lon='-7938675'
lat='4367022' label='Toronto, ON' description='Toronto' zoom='10'/></
location-document>";
3.
Invoke invokeApplication() using the APP_TYPE_MAPS constant parameter, a new MapsArguments
object that uses the ARG_LOCATION_DOCUMENT property, and the location String.
Invoke.invokeApplication(Invoke.APP_TYPE_MAPS, new MapsArguments
( MapsArguments.ARG_LOCATION_DOCUMENT, document));
Displaying location information on a BlackBerry device
13