Blackberry GPS and BlackBerry Maps 매뉴얼 - 페이지 16
{카테고리_이름} Blackberry GPS and BlackBerry Maps에 대한 매뉴얼을 온라인으로 검색하거나 PDF를 다운로드하세요. Blackberry GPS and BlackBerry Maps 35 페이지. Version: 4.7.0
Development Guide
View a sample application that displays a location 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 Single Location.
5.
To view more details, from the application menu, select Details.
Open BlackBerry Maps to display multiple 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 that contains location information for multiple locations.
String document = "<location-document>" + "<location lon='-8030000'
lat='4326000' label='Kitchener, ON' description='Kitchener, Ontario,
Canada' />" + "<location lon='-7569792' lat='4542349' label='Ottawa, ON'
description='Ottawa, Ontario, Canada' />" + "</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));
14
Displaying location information on a BlackBerry device