public class LineString extends Geometry
Parcelable.ClassLoaderCreator<T>, Parcelable.Creator<T>| Modifier and Type | Field and Description |
|---|---|
static Parcelable.Creator<LineString> |
CREATOR |
JSON_COORDINATESJSON_TYPECONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE| Constructor and Description |
|---|
LineString() |
LineString(JSONArray positions) |
LineString(JSONObject json) |
| Modifier and Type | Method and Description |
|---|---|
void |
addPosition(Position position) |
List<Position> |
getPositions() |
String |
getType()
The type of GeoJSON object.
|
boolean |
isLinearRing() |
void |
removePosition(Position position) |
void |
setPositions(JSONArray positions) |
void |
setPositions(List<Position> positions) |
JSONObject |
toJSON()
Formats the object's attributes as GeoJSON.
|
describeContents, readParcel, writeToParcelpublic static final Parcelable.Creator<LineString> CREATOR
public LineString()
public LineString(JSONObject json)
public LineString(JSONArray positions)
public void addPosition(Position position)
public void removePosition(Position position)
public void setPositions(JSONArray positions)
public boolean isLinearRing()
public String getType()
GeoJSONObjectGeoJSON, such as GeoJSON.TYPE_FEATURE.getType in class GeoJSONObjectpublic JSONObject toJSON() throws JSONException
GeometrytoJSON in class GeometryJSONObjectJSONException