public class Shape extends Object
Created by xizhens on 2/28/14. Copyright reserved by Telenav.Inc
| Modifier and Type | Class and Description |
|---|---|
static class |
Shape.ShapeType
The supported shape type by the map view.
|
| Constructor and Description |
|---|
Shape(Shape.ShapeType type)
This is the default constructor for the Shape object.
|
| Modifier and Type | Method and Description |
|---|---|
ShapeAttribute |
getAttribute()
This method is used to get the shape attribute for the current shape.
|
ArrayList<android.location.Location> |
getPath()
This method is used to get the shape path.
|
Shape.ShapeType |
getType()
This method is used to get the type of current shape.
|
void |
setAttribute(ShapeAttribute attribute)
This method is used to set the shape attribute for the current shape.
|
void |
setPath(ArrayList<android.location.Location> path)
This method is used to update the shape path.
|
org.json.JSONObject |
toJson()
This method is used to convert the Shape ojbect to a JSONObject.
|
int |
typeValue(Shape.ShapeType type) |
public Shape(Shape.ShapeType type)
type - defines the type of the shape; either polygon or polylinepublic int typeValue(Shape.ShapeType type)
public ArrayList<android.location.Location> getPath()
public void setPath(ArrayList<android.location.Location> path)
path - arrayList of the location points defining the trace of the shapepublic ShapeAttribute getAttribute()
public void setAttribute(ShapeAttribute attribute)
attribute - the attribute object you want to use for the current shapepublic Shape.ShapeType getType()
public org.json.JSONObject toJson()
throws org.json.JSONException
org.json.JSONException - if anything goes wrong in the serialization process