View a sample application that displays multiple locations on a map
1.
From the BlackBerry® Integrated Development Environment, launch 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
.
Open BlackBerry Maps to display a route between locations on a map
1.
Import the following classes:
•
net.rim.blackberry.api.invoke.Invoke
•
net.rim.blackberry.api.invoke.MapsArguments
2.
Create a
String
with route information within the
<getRoute>
elements.
String document = "<location-document><GetRoute>" + "<location
lon='-8030000' lat='4326000' label='Kitchener, ON' description='Kitchener,
Ontario, Canada' />" +
Development Guide
Displaying location information on a BlackBerry device
15