Blackberry JAVA DEVELOPMENT ENVIRONMENT - - GPS AND MAPS - DEVELOPMENT GUIDE Manual de usuario Pagina 21

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 30
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 20
For RIM and BlackBerry partner use only. Beta documentation. Content and software are subject to change.
21
3: Displaying location information on a BlackBerry device
lat='4542349' label='Ottawa, ON' description='Ottawa, Ontario, Canada' />" + "</
lbs>";
2. 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));
View a sample application that displays multiple locations on a map
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 Location Document.
4. Open the menu and click View Multiple Locations. BlackBerry® Maps displays the following map:
Open BlackBerry Maps to display a route between locations on a map
1. Create a String with route information within the <getRoute> elements.
String document = "<lbs><GetRoute>" + "<location lon='-8030000' lat='4326000'
label='Kitchener, ON' description='Kitchener, Ontario, Canada' />" +
"<location lon='-7569792' lat='4542349' label='Ottawa, ON' description='Ottawa,
Ontario, Canada' />" + "</GetRoute></lbs>";
2. Invoke invokeApplication() using the APP_TYPE_MAPS constant parameter, a new MapsArguments object
that uses the
ARG_LOCATION_DOCUMENT property and the String.
Invoke.invokeApplication(Invoke.APP_TYPE_MAPS, new MapsArguments(
MapsArguments.ARG_LOCATION_DOCUMENT,document));
View a sample application that displays a route between locations on a map
1. From the BlackBerry® Integrated Development Environment, start the BlackBerryMapsDemo project.
2. In the BlackBerry Smartphone Simulator, click BlackBerry Maps Demo.
Vista de pagina 20
1 2 ... 16 17 18 19 20 21 22 23 24 25 26 ... 29 30

Comentarios a estos manuales

Sin comentarios