Package com.navmii.sdk.map
Class GeoPolyline
java.lang.Object
com.navmii.sdk.map.GeoObject
com.navmii.sdk.map.GeoPolyline
public final class GeoPolyline extends GeoObject
-
Constructor Summary
Constructors Constructor Description GeoPolyline(MapRectangle mapRectangle)
Creates a polyline from the specified MapRectangle.GeoPolyline(java.util.List<MapCoordinates> vertices)
Creates a polyline from the specified vertices. -
Method Summary
Modifier and Type Method Description void
addVertex(int index, MapCoordinates vertex)
Inserts the specified vertex at the specified index.void
addVertex(MapCoordinates vertex)
Appends the specified vertex to the list of vertices.int
getColor()
int
getVertexCount()
java.util.List<MapCoordinates>
getVertices()
Returns a copy of the vertices of this polyline.float
getWidth()
void
removeAllVertices()
Clears the list of vertices.void
removeLastVertex()
Removes the last vertex from the list of vertices.void
removeVertex(int index)
Removes the vertex at the specified index.void
setColor(int color)
void
setVertexPosition(int index, MapCoordinates vertex)
Changes the position of the specified vertex.void
setVertices(java.util.List<MapCoordinates> vertices)
void
setWidth(float width)
-
Constructor Details
-
GeoPolyline
Creates a polyline from the specified vertices.- Parameters:
vertices
- The vertices of the polyline.
-
GeoPolyline
Creates a polyline from the specified MapRectangle.- Parameters:
mapRectangle
- The map rectangle.
-
-
Method Details
-
getWidth
public float getWidth()- Returns:
- The width in dp units.
-
setWidth
public void setWidth(float width)- Parameters:
width
- The width in dp units.
-
getColor
public int getColor()- Returns:
- The color represented as a packed int (AARRGGBB).
-
setColor
public void setColor(int color)- Parameters:
color
- The color represented as a packed int (AARRGGBB).
-
getVertices
Returns a copy of the vertices of this polyline.- Returns:
- A copy of the vertices.
-
setVertices
- Parameters:
vertices
- The new vertices for this polyline.
-
addVertex
Appends the specified vertex to the list of vertices.- Parameters:
vertex
- The vertex to append.
-
addVertex
Inserts the specified vertex at the specified index.- Parameters:
index
- The index.vertex
- The vertex to insert.
-
setVertexPosition
Changes the position of the specified vertex.- Parameters:
index
- The index.vertex
- The new position.
-
removeVertex
public void removeVertex(int index)Removes the vertex at the specified index.- Parameters:
index
- The index.
-
removeLastVertex
public void removeLastVertex()Removes the last vertex from the list of vertices. -
removeAllVertices
public void removeAllVertices()Clears the list of vertices. -
getVertexCount
public int getVertexCount()- Returns:
- The number of vertices.
-