Class GeoPolyline


  • public final class GeoPolyline
    extends GeoObject
    • Constructor Detail

      • GeoPolyline

        public GeoPolyline​(java.util.List<MapCoordinates> vertices)
        Creates a polyline from the specified vertices.
        Parameters:
        vertices - The vertices of the polyline.
      • GeoPolyline

        public GeoPolyline​(MapRectangle mapRectangle)
        Creates a polyline from the specified MapRectangle.
        Parameters:
        mapRectangle - The map rectangle.
    • Method Detail

      • 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

        public java.util.List<MapCoordinates> getVertices()
        Returns a copy of the vertices of this polyline.
        Returns:
        A copy of the vertices.
      • setVertices

        public void setVertices​(java.util.List<MapCoordinates> vertices)
        Parameters:
        vertices - The new vertices for this polyline.
      • addVertex

        public void addVertex​(MapCoordinates vertex)
        Appends the specified vertex to the list of vertices.
        Parameters:
        vertex - The vertex to append.
      • addVertex

        public void addVertex​(int index,
                              MapCoordinates vertex)
        Inserts the specified vertex at the specified index.
        Parameters:
        index - The index.
        vertex - The vertex to insert.
      • setVertexPosition

        public void setVertexPosition​(int index,
                                      MapCoordinates vertex)
        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.