Help Center

Local Navigation

Work with a map that displays in a UI field

A BlackBerry® device application can use the net.rim.device.api.lbs.MapField class to display a map in the UI. The net.rim.device.api.lbs.MapField class permits a BlackBerry device application to change and retrieve the properties of the map including the zoom level, center of the map, and current rotation of the map.

Method

Description

MapField.moveTo(int latitude, int longitude)

Modify the center of a map in a UI field using latitudinal and longitudinal values, in degrees. The latitude and longitude values are calculated as degrees that are multiplied by 100,000.

MapField.moveTo(javax.microedition. location.Coordinates coords)

Modify the center of a map in a UI field using specific coordinates.

MapField.move(int dx, int dy)

Modify the center of a map in a UI field using pixel values. The move(dx,dy) method moves the center of the map in terms of relative pixels. A positive dx moves the center of the map east if the rotation is 0. A positive dy moves the center of the map south if the rotation is 0.

MapField.setZoom(int z)

Modify the zoom value for a map in a UI field. Zoom values can range from 0 to 15. The zoom operation is performed to the center of the map in the MapField.

MapField.setRotation(int r)

Modify the rotation for a map in a UI field, in degrees. Rotation can range from 0 to 360, clockwise. A rotation setting of 0 specifies north at the top of the map view.

MapField.getLatitude()

Retrieve the latitude of the center of a map in a UI field.

MapField.getLongitude()

Retrieve the longitude of the center of a map in a UI field.

MapField.getZoom()

Retrieve the zoom value of a map in a UI field.

MapField.getRotation()

Retrieve the rotation setting for a map in a UI field.


Was this information helpful? Send us your comments.