public class Polygon extends Geometry
Parcelable.ClassLoaderCreator<T>, Parcelable.Creator<T>| Modifier and Type | Field and Description |
|---|---|
static Parcelable.Creator<Polygon> |
CREATOR |
JSON_COORDINATESJSON_TYPECONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE| Constructor and Description |
|---|
Polygon() |
Polygon(JSONArray rings) |
Polygon(JSONObject json) |
Polygon(Ring ring) |
| Modifier and Type | Method and Description |
|---|---|
void |
addRing(Ring ring) |
List<Ring> |
getRings() |
String |
getType()
The type of GeoJSON object.
|
void |
removeRing(Ring ring) |
void |
setRings(JSONArray rings) |
void |
setRings(List<Ring> rings) |
JSONObject |
toJSON()
Formats the object's attributes as GeoJSON.
|
describeContents, readParcel, writeToParcelpublic static final Parcelable.Creator<Polygon> CREATOR
public Polygon()
public Polygon(Ring ring)
public Polygon(JSONObject json)
public Polygon(JSONArray rings)
public void addRing(Ring ring)
public void removeRing(Ring ring)
public void setRings(JSONArray rings)
public String getType()
GeoJSONObjectGeoJSON, such as GeoJSON.TYPE_FEATURE.getType in class GeoJSONObjectpublic JSONObject toJSON() throws JSONException
GeometrytoJSON in class GeometryJSONObjectJSONException