public class Polygon extends Geometry
| Modifier and Type | Field and Description |
|---|---|
protected java.util.List<java.util.List<Point>> |
points |
FEATURE_TYPE| Constructor and Description |
|---|
Polygon(com.google.api.services.mapsengine.model.Feature feature)
Converts the provided Feature into a typed Polygon, discarding properties.
|
| Modifier and Type | Method and Description |
|---|---|
com.google.api.services.mapsengine.model.Feature |
asFeature(java.util.Map<java.lang.String,java.lang.Object> properties)
Returns a Feature that can be used by the Maps Engine API.
|
static Polygon |
createMultiRingPolygon(java.util.List<java.util.List<Point>> points)
Creates a multi-ring polygon using the list of points provided.
|
static Polygon |
createSimplePolygon(java.util.List<Point> points)
Creates a polygon using the list of points provided.
|
java.util.List<java.util.List<Point>> |
getPoints()
Get the list of points that make up this polygon.
|
fromGeoJsonprotected java.util.List<java.util.List<Point>> points
public Polygon(com.google.api.services.mapsengine.model.Feature feature)
feature - the Feature returned by the APIjava.lang.IllegalArgumentException - when feature is not a polygonpublic static Polygon createSimplePolygon(java.util.List<Point> points)
points - A list of 4 or more points, in counter-clockwise orderpublic static Polygon createMultiRingPolygon(java.util.List<java.util.List<Point>> points)
points - A list of 1 or more linear rings (lists of points)public com.google.api.services.mapsengine.model.Feature asFeature(java.util.Map<java.lang.String,java.lang.Object> properties)
public java.util.List<java.util.List<Point>> getPoints()