
For RIM and BlackBerry partner use only. Beta documentation. Content and software are subject to change.
24
GPS and BlackBerry Maps Development Guide
2. Add a contact to the address book. If there are no addresses in the address book, the sample will display the
default BlackBerry® Maps view.
3. Open the BlackBerry® Integrated Development Environment.
4. Run the BlackBerryMapsDemo project.
5. In the BlackBerry Smartphone Simulator, click BlackBerry Maps Demo.
6. Open the menu and click Invoke Contact.
7. Open the menu and click View Map.
Open BlackBerry Maps from the browser
A BlackBerry device user can use the browser on a BlackBerry device to access location information on a web
server and display that information in BlackBerry Maps. Developers store location information in .xloc files and
place the .xloc files on a web server. When a BlackBerry device user accesses the link for the .xloc file, for example
http://servername/Filename.xloc, the browser launches BlackBerry Maps to display the location information. The
browser passes the .xloc file as a String to the Location Document parser.
1. Create a file with the extension .xloc.
2. Place location information in the .xloc file. The location information is the same information you place on the
right-side of the equal sign in a location document. For example, "<lbs><location lon='-7938675'
lat='4367022' label='Toronto, ON' description='Toronto' zoom='10'/></lbs>";
3. On a web server, place the .xloc file in the folder where you store html files.
4. Register the following MIME type with the web server: text/vnd.rim.location xloc.
Clearing data from the map that BlackBerry Maps displays
You can use the id and clear attributes of the <lbs> element to remove data from a map that BlackBerry® Maps
displays.
Kommentare zu diesen Handbüchern