AtlasCT.com
User Manual v5.0

Polygon

Inheritance: Shape > Poly > Polygon

The Polygon class is used to draw a polygon on the map.
The Polygon class is based on the Shape and Poly classes, and in order to add a polygon on the map you should add the polygon object to the map’s LayersManager object.

See on the examples page Use shapes -> Add polygon to map


Summary
Inheritance: Shape > Poly > Polygon
The Polygon constructor.
Returns the brush style of the polygon.
Return true if the point is in the polygon, otherwise returns false.
Sets a new brush style to the polygon.

Constructors

Polygon

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

The Polygon constructor.

Parameters

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

Methods

getBrushStyle

BrushStyle getBrushStyle()

Returns the brush style of the polygon.

Returns

The brush style of the polygon.

See Also

setBrushStyle

isPointInside

boolean isPointInside(LatLong latLong)

Return true if the point is in the polygon, otherwise returns false(does not support complex polygon).

Returns

True if the point is in the polygon, otherwise returns false.

Parameters

latLongThe coordinate of the point.

setBrushStyle

setBrushStyle(BrushStyle brushStyle)

Sets a new brush style to the polygon.

Parameters

brushStyleA new brush style.

See Also

getBrushStyle

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.

Inheritance: Shape > Poly
Polygon(string id
Array[] Coordinate verticesList
LineStyle lineStyle
BrushStyle brushStyle
string label
string hint
boolean isVisible
boolean isLabelVisible)
The Polygon constructor.
setBrushStyle(BrushStyle brushStyle)
Sets a new brush style to the polygon.
BrushStyle getBrushStyle()
Returns the brush style of the polygon.
boolean isPointInside(LatLong latLong)
Return true if the point is in the polygon, otherwise returns false.
Inheritance: Layer > LayersCollection > LayersManager
This is the base class of the provided coordinates classes.
This class defines a line style.
This class defines a brush style.