PolyInheritance: Shape > Poly The Poly class is used to define a Poly to be drawn on the map. In order to add a polygon or polyline (that are based on the Poly class) on the map you should add the polygon or polyline object to the map’s LayersManager object.
See on the examples page Use shapes -> Add polygon to map
Summary | Inheritance: Shape > Poly | | | | | | | | Adds a new vertex to the poly. | | Returns the bounding box (Top Left, Bottom Right) position of the poly. | | Returns the line style of the poly. | | Returns the coordinate of the specified vertex. | | Returns the vertices of the poly. | | Returns the vertices number of the poly. | | Insert a new vertex at the specified index. | | Sets a new line style to the poly. | | Sets a new coordinate to the specified vertex. | | Sets new vertices to the poly. |
PolyPoly( | string id | | | Array[] Coordinate verticesList | | | LineStyle lineStyle | | | string label | | | string hint | | | boolean isVisible | | | boolean isLabelVisible | | ) |
|
The Poly constructor. Parametersid | The id of the poly. | verticesList | Array of coordinates. | lineStyle | The line style of the poly. | label | The label of the poly. | hint | The hint of the poly. | isVisible | Determine if the poly is visible. | isLabelVisible | Determine if the label of the poly is visible. |
addVertexAdds a new vertex to the poly. ParameterslatLong | The LatLong coordinate of the new vertex. |
getBoundsReturns the bounding box (Top Left, Bottom Right) position of the poly. ReturnsThe bounding box position of the poly.
getLineStyleReturns the line style of the poly. ReturnsThe line style of the poly. See AlsosetLineStyle
getVertexCoordinateLatLong getVertexCoordinate(int atIndex) |
|
Returns the coordinate of the specified vertex. ParametersatIndex | The vertex index (The first vertex index is 0). |
See AlsosetVertexCoordinate
getVerticesReturns the vertices of the poly. ReturnsThe vertices of the poly. See AlsosetVertices
getVerticesCountReturns the vertices number of the poly. ReturnsThe vertices number of the poly. See AlsosetHint, setLabel, getLabel
insertVertexinsertVertex( | LatLong latLong | | | int atIndex | | ) |
|
Insert a new vertex at the specified index. ParameterslatLong | The LatLong coordinate of the new vertex. | atIndex | The new vertex index (The first vertex index is 0). |
setLineStyleSets a new line style to the poly. ParameterslineStyle | A new line style. |
See AlsogetLineStyle
setVertexCoordinatesetVertexCoordinate( | LatLong latLong | | | int atIndex | | ) |
|
Sets a new coordinate to the specified vertex. ParameterslatLong | The new LatLong coordinate of the vertex. | atIndex | The vertex index (The first vertex index is 0). |
See AlsogetVertexCoordinate
setVerticesSets new vertices to the poly. ParametersverticesList | Array of coordinates. |
See AlsogetVertices
|