com.mapquest
Class PolygonFeature

java.lang.Object
  extended bycom.mapquest.MQObject
      extended bycom.mapquest.Feature
          extended bycom.mapquest.PolygonFeature
All Implemented Interfaces:
java.lang.Cloneable

public class PolygonFeature
extends Feature

Describes a map feature that is represented as a polygon. Examples are parks and roads at low scales.

See Also:
LatLng, LatLngCollection, Point, PointCollection

Field Summary
static int CLASS_ID
           
static java.lang.String CLASS_NAME
           
 
Fields inherited from class com.mapquest.MQObject
DEFAULT_ID, DEFAULT_NAME, DEFAULT_VERSION, FORMAT_NUMERIC_ID, FORMAT_TEXT_NAME, INVALID_ID, INVALID_NAME, INVALID_VERSION
 
Constructor Summary
PolygonFeature()
          Default constructor.
 
Method Summary
 boolean equals(java.lang.Object otherObject)
          Compares this object to the specified object.
 int getClassId()
          Returns the numeric id of this class.
 java.lang.String getClassName()
          Returns the text name of this class.
 LatLng getClosestLatLng()
          Returns the latitude/longitude coordinates of this PolygonFeature.
 Point getClosestPoint()
          Returns the X and Y coordinates of this PolygonFeature.
 LatLngCollection getLatLngs()
          Returns the LatLng Collection of this PolygonFeature.
 PointCollection getPoints()
          Returns the PointCollection of this PolygonFeature.
 int hashCode()
          Returns a hash code for this PolygonFeature.
 void init()
          Initializes object.
 void setClosestLatLng(LatLng ll)
          Sets the latitude/longitude values for this PolygonFeature.
 void setClosestPoint(Point pt)
          Sets the X and Y coordinate values for this PolygonFeature.
 
Methods inherited from class com.mapquest.Feature
getDistance, getDistance, getDT, getGEFID, getKey, getName, getSourceLayerName, setDistance, setDistance, setDT, setGEFID, setKey, setName, setSourceLayerName
 
Methods inherited from class com.mapquest.MQObject
clone, getFormat, getIdWithVersion, getNameWithVersion, getObjectVersion, getTypeId, getTypeName, getVerboseConsoleOutput, setFormat, setObjectVersion, setVerboseConsoleOutput, toString
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

CLASS_ID

public static final int CLASS_ID
See Also:
Constant Field Values

CLASS_NAME

public static final java.lang.String CLASS_NAME
See Also:
Constant Field Values
Constructor Detail

PolygonFeature

public PolygonFeature()
Default constructor.

Method Detail

init

public void init()
Initializes object.

Overrides:
init in class Feature

getClassId

public int getClassId()
Returns the numeric id of this class.

Overrides:
getClassId in class MQObject
Returns:
the numeric id of this class.

getClassName

public java.lang.String getClassName()
Returns the text name of this class.

Overrides:
getClassName in class MQObject
Returns:
the text name of this class.

setClosestLatLng

public void setClosestLatLng(LatLng ll)
Sets the latitude/longitude values for this PolygonFeature.

Parameters:
ll - The latitude/longitude values for this PolygonFeature.

getClosestLatLng

public LatLng getClosestLatLng()
Returns the latitude/longitude coordinates of this PolygonFeature.

Returns:
The latitude/longitude coordinates of this PolygonFeature.

setClosestPoint

public void setClosestPoint(Point pt)
Sets the X and Y coordinate values for this PolygonFeature.

Parameters:
pt - An point containing the X and Y coordinates for this PolygonFeature.

getClosestPoint

public Point getClosestPoint()
Returns the X and Y coordinates of this PolygonFeature. X and Y are the pixel coordinates of this PolygonFeature on the map.

Returns:
The X and Y coordinates of this PolygonFeature.

getLatLngs

public LatLngCollection getLatLngs()
Returns the LatLng Collection of this PolygonFeature.

Returns:
The LatLngCollection of this PolygonFeature.

getPoints

public PointCollection getPoints()
Returns the PointCollection of this PolygonFeature.

Returns:
The PointCollection of this PolygonFeature.

equals

public boolean equals(java.lang.Object otherObject)
Compares this object to the specified object. The result is true if and only if the argument is not null and is a PolygonFeature object that has same attributes as this object.

Overrides:
equals in class Feature
Parameters:
otherObject - the object to compare this PolygonFeature against.
Returns:
true if the PolygonFeature objects are equal; false otherwise.

hashCode

public int hashCode()
Returns a hash code for this PolygonFeature.

Overrides:
hashCode in class Feature
Returns:
a hash code value for this PolygonFeature.