Icons
Geocode
LBS
Search
Route
Points
Miscellaneous
Index

Poly

Inheritance: 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
The Poly constructor.
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.

Constructors

Poly

Poly(string id
Array[] Coordinate verticesList
LineStyle lineStyle
string label
string hint
boolean isVisible
boolean isLabelVisible)

The Poly constructor.

Parameters

idThe id of the poly.
verticesListArray of coordinates.
lineStyleThe line style of the poly.
labelThe label of the poly.
hintThe hint of the poly.
isVisibleDetermine if the poly is visible.
isLabelVisibleDetermine if the label of the poly is visible.

Methods

addVertex

addVertex(LatLong latLong)

Adds a new vertex to the poly.

Parameters

latLongThe LatLong coordinate of the new vertex.

getBounds

Bounds getBounds()

Returns the bounding box (Top Left, Bottom Right) position of the poly.

Returns

The bounding box position of the poly.

getLineStyle

LineStyle getLineStyle()

Returns the line style of the poly.

Returns

The line style of the poly.

See Also

setLineStyle

getVertexCoordinate

LatLong getVertexCoordinate(int atIndex)

Returns the coordinate of the specified vertex.

Parameters

atIndexThe vertex index (The first vertex index is 0).

See Also

setVertexCoordinate

getVertices

Array[] Coordinate getVertices()

Returns the vertices of the poly.

Returns

The vertices of the poly.

See Also

setVertices

getVerticesCount

int getVerticesCount()

Returns the vertices number of the poly.

Returns

The vertices number of the poly.

See Also

setHint, setLabel, getLabel

insertVertex

insertVertex(LatLong latLong
int atIndex)

Insert a new vertex at the specified index.

Parameters

latLongThe LatLong coordinate of the new vertex.
atIndexThe new vertex index (The first vertex index is 0).

setLineStyle

setLineStyle(LineStyle lineStyle)

Sets a new line style to the poly.

Parameters

lineStyleA new line style.

See Also

getLineStyle

setVertexCoordinate

setVertexCoordinate(LatLong latLong
int atIndex)

Sets a new coordinate to the specified vertex.

Parameters

latLongThe new LatLong coordinate of the vertex.
atIndexThe vertex index (The first vertex index is 0).

See Also

getVertexCoordinate

setVertices

setVertices(Array[] Coordinate verticesList)

Sets new vertices to the poly.

Parameters

verticesListArray of coordinates.

See Also

getVertices

The Shape class is used to define a shape (Marker, Polygon, Polyline, Circle) to be drawn on the map.
In order to add any shape on the map you should add the shape object to the map’s LayersManager object.

Poly(string id
Array[] Coordinate verticesList
LineStyle lineStyle
string label
string hint
boolean isVisible
boolean isLabelVisible)
The Poly constructor.
int getVerticesCount()
Returns the vertices number of the poly.
setVertexCoordinate(LatLong latLong
int atIndex)
Sets a new coordinate to the specified vertex.
LatLong getVertexCoordinate(int atIndex)
Returns the coordinate of the specified vertex.
insertVertex(LatLong latLong
int atIndex)
Insert a new vertex at the specified index.
addVertex(LatLong latLong)
Adds a new vertex to the poly.
setVertices(Array[] Coordinate verticesList)
Sets new vertices to the poly.
Array[] Coordinate getVertices()
Returns the vertices of the poly.
Bounds getBounds()
Returns the bounding box (Top Left, Bottom Right) position of the poly.
setLineStyle(LineStyle lineStyle)
Sets a new line style to the poly.
LineStyle getLineStyle()
Returns the line style of the poly.
Inheritance: Layer > LayersCollection > LayersManager
This is the base class of the provided coordinates classes.
This class defines a line style.
t.setHint =function(_hint)
Sets a new hint to the shape.
t.setLabel =function(_label)
Sets a new label to the shape.
t.getLabel =function()
Returns the label of the shape.
Inheritance: Coordinate > LatLong

The Bounds class represent a rectangular area of the map in geographical coordinates.