|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectnet.rim.device.api.lbs.maps.model.AbstractMappable
net.rim.device.api.lbs.maps.model.MapPoint
net.rim.device.api.lbs.maps.model.MapMarker
net.rim.device.api.lbs.maps.model.geospatial.GsMarker
net.rim.device.api.lbs.maps.model.MapLocation
public class MapLocation
Represents a mappable location that includes the latitude,
longitude, label and description of the location.
You can also use the MapLocation class to store
additional information about the location. The type of information
stored in a MapLocation represents a certain 'type' of
location. For example, a point of interest location (a business)
might have more information about the location, whereas a basic location
might have less information. The additional information is stored in the form
of a (key, value) pair, where the key can be a pre-defined string token
defined in this class or in any object that you specify. The key must
not conflict with the predefined set of keys that are already saved
for this location.
| Field Summary | ||
|---|---|---|
static String |
LBS_DISTANCE_FROM_POI_CENTER_KEY
A data key to specify the distance between a given point of interest (POI) location and the center of the region containing that POI location. |
|
static String |
LBS_DISTANCE_FROM_POI_CENTRE_KEY
Deprecated. Use MapLocation.LBS_DISTANCE_FROM_POI_CENTER_KEY instead |
|
static String |
LBS_LOCATION_CATEGORIES_KEY
A data key to specify the location's categories. |
|
static String |
LBS_LOCATION_CITY_KEY
A data key to specify the location's city. |
|
static String |
LBS_LOCATION_COUNTRY_KEY
A data key to specify the location's country. |
|
static String |
LBS_LOCATION_COUNTY_KEY
A data key to specify the location's county. |
|
static String |
LBS_LOCATION_DISTRICT_KEY
A data key to specify the location's district. |
|
static String |
LBS_LOCATION_EMAIL_KEY
A data key to specify the location's email address. |
|
static String |
LBS_LOCATION_FAX_KEY
A data key to specify the location's fax number. |
|
static String |
LBS_LOCATION_ISO_ALPHA_2_COUNTRY_CODE
A data key to specify the 2 character ISO 3166-1 country code. |
|
static String |
LBS_LOCATION_ISO_ALPHA_3_COUNTRY_CODE
A data key to specify the 3 character ISO 3166-1 country code. |
|
static String |
LBS_LOCATION_ISO_COUNTRY_ID
A data key to specify the ISO 3166-1 country id. |
|
static String |
LBS_LOCATION_MCC
A data key to specify the mcc. |
|
static String |
LBS_LOCATION_PHONE_KEY
A data key to specify the location's phone number. |
|
static String |
LBS_LOCATION_POSTAL_CODE_KEY
A data key to specify the location's postal code or zip code. |
|
static String |
LBS_LOCATION_RATING_KEY
A data key to specify the location's rating. |
|
static String |
LBS_LOCATION_REGION_KEY
A data key to specify the location's region (for example, province). |
|
static String |
LBS_LOCATION_REVIEW_KEY
A data key to specify the location's review. |
|
static String |
LBS_LOCATION_STREET_ADDRESS_KEY
A data key to specify the location's street address. |
|
static String |
LBS_LOCATION_TIME_ZONE
A data key to specify the time zone id. |
|
static String |
LBS_LOCATION_URL_KEY
A data key to specify the location's URL. |
|
static String |
LBS_POI_LOCATION_FOLDER_HIERARCHY_KEY
A data key to specify the hierarchy of the location's folder. |
|
static String |
LBS_POI_LOCATION_MERIT_KEY
A data key to specify the location's merit. |
|
static String |
LBS_POI_LOCATION_SOURCE_KEY
A data key to specify the location's source. |
|
static String |
LBS_POI_LOCATION_SPONSORED_KEY
A data key to specify the location's sponsor. |
|
static String |
LBS_ZOOM_HINT
A data key to specify a zoom hint for the location. |
|
| Constructor Summary | ||
|---|---|---|
MapLocation()
Constructs a new MapLocation instance. |
||
MapLocation(double lat,
double lon,
String label,
String description)
Constructs a new MapLocation instance using the latitude, longitude, name and description of the location. |
||
MapLocation(MapPoint mapPoint,
String label,
String description)
Constructs a new MapLocation instance using the coordinates, label, and description of the location. |
||
| Method Summary | ||
|---|---|---|
void |
addData(Object key,
Object value)
Adds additional data to this location object. |
|
boolean |
equals(Object obj)
Indicates whether some other object is "equal to" this one. |
|
Object |
getData(Object key)
Retrieves existing data for a specified key. |
|
Enumeration |
getDataKeys()
Retrieves an enumeration of the data keys in this Location object. |
|
int |
hashCode()
Returns a hash code value for the object. |
|
void |
removeData(Object key)
Removes existing data for a specific key. |
|
String |
toString()
Generates the string representation for this Location object. |
|
| Methods inherited from class net.rim.device.api.lbs.maps.model.geospatial.GsMarker |
|---|
equalsHierarchically, equalsNode, getDescription, getName, getParent, setDescription, setName, setParent |
| 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, 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 |
| Methods inherited from interface net.rim.device.api.lbs.maps.model.Mappable |
|---|
getStyleId, isClusterable |
| Methods inherited from interface net.rim.device.api.lbs.maps.Boxable |
|---|
getBoundingBox |
| Field Detail |
|---|
public static final String LBS_LOCATION_STREET_ADDRESS_KEY
public static final String LBS_LOCATION_CITY_KEY
public static final String LBS_LOCATION_REGION_KEY
public static final String LBS_LOCATION_COUNTY_KEY
public static final String LBS_LOCATION_DISTRICT_KEY
public static final String LBS_LOCATION_COUNTRY_KEY
public static final String LBS_LOCATION_POSTAL_CODE_KEY
public static final String LBS_LOCATION_PHONE_KEY
public static final String LBS_LOCATION_FAX_KEY
public static final String LBS_LOCATION_URL_KEY
public static final String LBS_LOCATION_EMAIL_KEY
public static final String LBS_LOCATION_CATEGORIES_KEY
public static final String LBS_LOCATION_REVIEW_KEY
public static final String LBS_LOCATION_RATING_KEY
public static final String LBS_POI_LOCATION_SPONSORED_KEY
public static final String LBS_POI_LOCATION_SOURCE_KEY
public static final String LBS_POI_LOCATION_FOLDER_HIERARCHY_KEY
public static final String LBS_POI_LOCATION_MERIT_KEY
public static final String LBS_DISTANCE_FROM_POI_CENTER_KEY
public static final String LBS_DISTANCE_FROM_POI_CENTRE_KEY
MapLocation.LBS_DISTANCE_FROM_POI_CENTER_KEY insteadpublic static final String LBS_ZOOM_HINT
public static final String LBS_LOCATION_MCC
public static final String LBS_LOCATION_TIME_ZONE
public static final String LBS_LOCATION_ISO_ALPHA_2_COUNTRY_CODE
public static final String LBS_LOCATION_ISO_ALPHA_3_COUNTRY_CODE
public static final String LBS_LOCATION_ISO_COUNTRY_ID
| Constructor Detail |
|---|
public MapLocation()
public MapLocation(MapPoint mapPoint,
String label,
String description)
mapPoint - The coordinates of the location.label - The label of the location.description - The description of the location.
public MapLocation(double lat,
double lon,
String label,
String description)
lat - The latitude of the location (in degrees).lon - The longitude of the location (in degrees).label - The location name (for example, RIM head office).description - The description of the location (for example, work place).| Method Detail |
|---|
public int hashCode()
Objectjava.util.Hashtable.
The general contract of hashCode is:
hashCode method on each of
the two objects must produce the same integer result.
Object.equals(java.lang.Object)
method, then calling the hashCode method on each of the
two objects must produce distinct integer results. However, the
programmer should be aware that producing distinct integer results
for unequal objects may improve the performance of hashtables.
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.)
hashCode in class GsMarkerObject.hashCode()public boolean equals(Object obj)
Object
The equals method implements an equivalence relation:
x,
x.equals(x) should return true.
x and
y, x.equals(y) should return
true if and only if y.equals(x) returns
true.
x,
y, and z, if x.equals(y)
returns true and y.equals(z) returns
true, then x.equals(z) should return
true.
x
and y, multiple invocations of x.equals(y)
consistently return true or consistently return
false, provided no information used in
equals comparisons on the object is modified.
x,
x.equals(null) should return false.
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).
equals in class GsMarkerobj - the reference object with which to compare.
true if this object is the same as the obj
argument; false otherwise.Object.equals(Object)
public void addData(Object key,
Object value)
addData in class MapPointkey - The key supplied by the caller.value - The value to store (under the supplied key).public Enumeration getDataKeys()
getDataKeys in class MapPointpublic void removeData(Object key)
removeData in class MapPointkey - The key provided by the caller.public Object getData(Object key)
getData in class MapPointkey - The key provided by the caller.
null if no data
is found for that key or if the key is not valid.public String toString()
toString in class MapPointObject.toString()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
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