net.rim.device.api.lbs.maps.model
Class MapImage

java.lang.Object
  extended by net.rim.device.api.lbs.maps.model.AbstractMappable
      extended by net.rim.device.api.lbs.maps.model.MapPoint
          extended by net.rim.device.api.lbs.maps.model.MapMarker
              extended by net.rim.device.api.lbs.maps.model.MapImage
All Implemented Interfaces:
Comparable, Boxable, Mappable, Persistable
Direct Known Subclasses:
GsImage

public class MapImage
extends MapMarker

Represents a bitmap image for a specified location on a map.

You can specify an image, a thumbnail, or a URI for the location. When you specify a thumbnail, the thumbnail displays directly on the map. When the user clicks on the thumbnail and requests more details, the larger image displays.

Since:
BlackBerry API 7.0.0

Constructor Summary
MapImage()
          Constructs a new MapImage instance.
MapImage(double lat, double lon, String iconUri)
          Constructs a MapImage instance at the given coordinates which is represented on the map with the icon at the given URI.
MapImage(double lat, double lon, Bitmap bitmap)
          Constructs a MapImage instance at the given coordinates with the given bitmap.
MapImage(MapPoint point, String imageURI)
          Constructs a MapImage instance at the given map point, using the image at the given URI.
 
Method Summary
 boolean equals(Object obj)
          Indicates whether some other object is "equal to" this one.
 Bitmap getImage()
          Retrieves the image.
 String getImageURI()
          Retrieves the URI of the image.
 Bitmap getThumbnail()
          Retrieves the thumbnail bitmap.
 int hashCode()
          Returns a hash code value for the object.
 void setImage(Bitmap bitmap)
          Sets the image.
 void setImageURI(String uri)
          Sets the URI of the image.
 void setThumbnail(Bitmap thumb)
          Sets a thumbnail bitmap that displays in the caption when this image has focus.
 
Methods inherited from class net.rim.device.api.lbs.maps.model.MapMarker
getAnchorOffset, getIconUri, setAnchorOffset, setIconUri
 
Methods inherited from class net.rim.device.api.lbs.maps.model.MapPoint
compareTo, getBoundingBox, getLat, getLon, setLat, setLon, toCoordinates, toString, updateBoundingBox
 
Methods inherited from class net.rim.device.api.lbs.maps.model.AbstractMappable
getCommandsByType, getStyleId, isClusterable, match, setStyleId
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 



Constructor Detail

MapImage

public MapImage()
Constructs a new MapImage instance.

Since:
BlackBerry API 7.0.0

MapImage

public MapImage(MapPoint point,
                String imageURI)
Constructs a MapImage instance at the given map point, using the image at the given URI.

Parameters:
point - The map point for the location.
imageURI - The image URI for the specified location.
Since:
BlackBerry API 7.0.0

MapImage

public MapImage(double lat,
                double lon,
                Bitmap bitmap)
Constructs a MapImage instance at the given coordinates with the given bitmap.

Parameters:
lat - The latitudinal coordinate for the location.
lon - The longitudinal coordinate for the location.
bitmap - The bitmap image for the specified location.
Since:
BlackBerry API 7.0.0

MapImage

public MapImage(double lat,
                double lon,
                String iconUri)
Constructs a MapImage instance at the given coordinates which is represented on the map with the icon at the given URI.

Parameters:
lat - The latitudinal coordinate for the location.
lon - The longitudinal coordinate for the location.
iconUri - The URI of the icon.
Since:
BlackBerry API 7.0.0


Method Detail

getImage

public Bitmap getImage()
Retrieves the image.

Returns:
The image.
Since:
BlackBerry API 7.0.0

setImage

public void setImage(Bitmap bitmap)
Sets the image.

Parameters:
bitmap - The image to set.
Since:
BlackBerry API 7.0.0

setThumbnail

public void setThumbnail(Bitmap thumb)
Sets a thumbnail bitmap that displays in the caption when this image has focus.

Parameters:
thumb - The thumbnail bitmap to display.
Since:
BlackBerry API 7.0.0

getThumbnail

public Bitmap getThumbnail()
Retrieves the thumbnail bitmap.

Returns:
bitmap The thumbnail bitmap.
Since:
BlackBerry API 7.0.0

setImageURI

public void setImageURI(String uri)
Sets the URI of the image.

Parameters:
uri - The URI of the image.
Since:
BlackBerry API 7.0.0

getImageURI

public String getImageURI()
Retrieves the URI of the image.

Returns:
The URI of the image.
Since:
BlackBerry API 7.0.0

hashCode

public int hashCode()
Description copied from class: Object
Returns a hash code value for the object. This method is supported for the benefit of hashtables such as those provided by java.util.Hashtable.

The general contract of hashCode is:

As much as is reasonably practical, the hashCode method defined by class Object does return distinct integers for distinct objects. (This is typically implemented by converting the internal address of the object into an integer, but this implementation technique is not required by the JavaTM programming language.)

Overrides:
hashCode in class MapMarker
Returns:
a hash code value for this object.
See Also:
Object.hashCode()
Since:
BlackBerry API 7.0.0

equals

public boolean equals(Object obj)
Description copied from class: Object
Indicates whether some other object is "equal to" this one.

The equals method implements an equivalence relation:

The equals method for class Object implements the most discriminating possible equivalence relation on objects; that is, for any reference values x and y, this method returns true if and only if x and y refer to the same object (x==y has the value true).

Overrides:
equals in class MapMarker
Parameters:
obj - the reference object with which to compare.
Returns:
true if this object is the same as the obj argument; false otherwise.
See Also:
Object.equals(Object)
Since:
BlackBerry API 7.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