public final class GeoPolygon extends GeoPolyline
GeoPolygon a polygon object defined in terms of the geographic coordinates of its vertices.
The only difference between a GeoPolygon and a GeoPolyline is
that the polygon represents a closed loop of points. The minimum number of points in a GeoPolygon must be
three.
This class can be used with MapPolygon to render
a polygon.
| Constructor and Description |
|---|
GeoPolygon()
Default Constructor
|
GeoPolygon(java.util.List<GeoCoordinate> points)
Constructor that creates a new instance of
GeoPolygon from a list of points. |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object other)
Checks whether the given
GeoPolygon object is
equal to that supplied by the caller. |
int |
hashCode()
Obtains the hash code for the given object.
|
add, add, clear, contains, getBoundingBox, getNearest, getNearestIndex, getNumberOfPoints, getPoint, insert, length, removepublic GeoPolygon()
public GeoPolygon(java.util.List<GeoCoordinate> points)
GeoPolygon from a list of points.points - A list of points to form the GeoPolygon.MapPolygonpublic int hashCode()
hashCode in class GeoPolylinepublic boolean equals(java.lang.Object other)
GeoPolygon object is
equal to that supplied by the caller. Two objects are equal if they are
both instances of GeoPolygon and the coordinates of their
vertices are the same.equals in class GeoPolylineother - A polygon object to compare to the given polygon.true if the polygons are equal, otherwise
false.