net.rim.device.api.lbs.maps
Class MapFactory

java.lang.Object
  extended by net.rim.device.api.lbs.maps.MapFactory

public final class MapFactory
extends Object

A collection of factories that are used to create static images of maps and generate map fields for user interaction.

Since:
BlackBerry API 6.0.0

Method Summary
 RichMapField generateRichMapField()
          Generates a map field using a profile that is based on the current device hardware.
 Bitmap generateStaticMapImage(MapDimensions mapProperties, MapDataModel data)
           
 Bitmap generateStaticMapImage(MapDimensions mapProperties, MappableVector data)
          Generates an image of a map at the specified coordinates and zoom level, showing the specified mappable data.
 Bitmap generateStaticMapImage(XYDimension imageSize, MappableVector data)
          Generates an image of a map.
static MapFactory getInstance()
          Retrieves an instance of the mapping factory.
 Vector populateDataModelFromKmlUrl(MapDataModel model, String url, String tag)
          Populates the data model with mappable entities that are retrieved from a URL that points to a KML file.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 



Method Detail

getInstance

public static MapFactory getInstance()
Retrieves an instance of the mapping factory.

Returns:
An instance of the mapping factory.
Since:
BlackBerry API 6.0.0

generateStaticMapImage

public Bitmap generateStaticMapImage(XYDimension imageSize,
                                     MappableVector data)
Generates an image of a map. The location of the map and the zoom level are determined by the amount of data to display.

Parameters:
imageSize - The size of the image.
data - The data to display on the map.
Returns:
An image with the data displayed on the map.
Since:
BlackBerry API 6.0.0

generateStaticMapImage

public Bitmap generateStaticMapImage(MapDimensions mapProperties,
                                     MappableVector data)
Generates an image of a map at the specified coordinates and zoom level, showing the specified mappable data.

Parameters:
mapProperties - The properties of the image and the map. This variable contains the size of the image, the location (latitude and longitude) of the center of the map and the zoom level.
data - The mappable data to show on the screen. If an instance of data is outside of the visible area specified by mapProperties, that data will not be visible on the map image.
Returns:
a Bitmap showing the desired area.
Since:
BlackBerry API 6.0.0

generateStaticMapImage

public Bitmap generateStaticMapImage(MapDimensions mapProperties,
                                     MapDataModel data)
See Also:
MapFactory.generateStaticMapImage(MapDimensions, MappableVector)
Since:
BlackBerry API 6.0.0

generateRichMapField

public RichMapField generateRichMapField()
Generates a map field using a profile that is based on the current device hardware.

Returns:
A map field based on the current device hardware profile.
Since:
BlackBerry API 6.0.0

populateDataModelFromKmlUrl

public Vector populateDataModelFromKmlUrl(MapDataModel model,
                                          String url,
                                          String tag)
Populates the data model with mappable entities that are retrieved from a URL that points to a KML file.

Notes:

Parameters:
model - The map data model in which to store the data.
url - The URL of the KML file.
tag - The tag to use to label all the data. If this parameter is null, no tagging is performed.
Returns:
A Vector of exceptions caught in the retrieval and processing of the KML data. If the Vector is empty, the data model was populated successfully.
Since:
BlackBerry API 6.0.0





Copyright 1999-2011 Research In Motion Limited. 295 Phillip Street, Waterloo, Ontario, Canada, N2L 3W8. All Rights Reserved.
Java is a trademark of Oracle America Inc. in the US and other countries.
Legal