Blackberry GPS and BlackBerry Maps Руководство - Страница 29

Просмотреть онлайн или скачать pdf Руководство для Программное обеспечение Blackberry GPS and BlackBerry Maps. Blackberry GPS and BlackBerry Maps 35 страниц. Version: 4.7.0

Development Guide
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

You can use the id and clear attributes of the <lbs> element to remove data from a map. When you want BlackBerry Maps
to no longer display certain location data, in the next location document you send to BlackBerry Maps, configure the clear
attribute to the value of the id attribute of the location document with the location data to remove.
For example, to display data for Kitchener, Ontario in BlackBerry Maps that you can later remove, give the id attribute of the
location document a value.
String document = "<lbs id='Kit' ><location lon='-0802300' lat='4327000'
label='Kitchener, ON' description='Kitchener' zoom='10'/></lbs>";
When you send the location document for Kitchener, Ontario to BlackBerry Maps, BlackBerry Maps displays the information for
Kitchener, Ontario.
To remove the information for Kitchener, Ontario from BlackBerry Maps, in the next location document you send to BlackBerry
Maps, configure the clear attribute to the value of the id attribute of the location document that contains information for
Kitchener.
String document = "<lbs clear='Kit' ><location lon='-7938675' lat='4367022'
label='Toronto, ON' description='Toronto' zoom='10'/></lbs>";
When you send the new location document to BlackBerry Maps, BlackBerry Maps removes the Kitchener data from the map.

Clear data from a location document with an id attribute

A location document string with id and clear attributes uses the following format.
<lbs id='<string>'' clear='{NONE | DOCS | LOCATIONS | ROUTES | ALL |
comma_delimited_list_of_document_ids}'>
You can only remove data from a location document that has an id attribute set to a value.
Create a String that configures the clear attribute to the id of the location document that contains the data to remove
from a map.
String document = "<lbs clear='Montreal' ><location lon='-7938675'
lat='4367022' label='Toronto, ON' description='Toronto' zoom='10'/></lbs>";

Clear data from all location documents with an id attribute

A location document string with id and clear attributes uses the following format.
<lbs id='<string>'' clear='{NONE | DOCS | LOCATIONS | ROUTES | ALL |
comma_delimited_list_of_document_ids}'>
Clearing data from the map
27