Icons
Geocode
LBS
Search
Route
Points
Miscellaneous
Index

VectorLayer

Inheritance: Layer > VectorLayer

The VectorLayer class allows you to add various of shapes (Polygon, Polyline, Circle, Marker) above the map.
In order to add a layer to the map, you should use the LocalVectorLayer or RemoteVectorLayer to store the shapes you would like to show on the map.
Any of the VectorLayer objects should be added to the map’s LayersManager.

See understanding the layers architecture


Summary
Inheritance: Layer > VectorLayer
The VectorLayer constructor.
Adds circle to the layer.
Adds marker to the layer.
Adds marker to the layer.
Adds polygon to the layer.
Returns the default brush style of the layer.
Returns the default line style of the layer.
Removes a specified shape from the layer.
Sets a default brush style to the layer.
Sets a default line style to the layer.
Represent a local vector layer.
Represent a remote vector layer.

Constructors

VectorLayer

VectorLayer(string name)

The VectorLayer constructor.

Parameters

nameThe name of the new vector layer

Methods

addShape

addShape(Circle circle)

Adds circle to the layer.

Parameters

circleThe circle to be added.

See Also

removeShape

addShape

addShape(Marker marker)

Adds marker to the layer.

Parameters

markerThe marker to be added.

See Also

removeShape

addShape

addShape(Polygon polygon)

Adds polygon to the layer.

Parameters

polygonThe polygon to be added.

See Also

removeShape

addShape

addShape(Polyline polyline)

Adds marker to the layer.

Parameters

polylineThe polyline to be added.

See Also

removeShape

getDefaultBrushStyle

getDefaultBrushStyle(BrushStyle brushStyle)

Returns the default brush style of the layer.

Returns

The default brush style of the layer.

See Also

setDefaultBrushStyle

getDefaultLineStyle

LineStyle getDefaultLineStyle()

Returns the default line style of the layer.

Return

The default line style of the layer.

See Also

setDefaultLineStyle

removeShape

removeShape(string id)

Removes a specified shape from the layer.

Parameters

idstring representing the unique ID of the shape to be removed.

See Also

addShape

setDefaultBrushStyle

setDefaultBrushStyle(BrushStyle brushStyle)

Sets a default brush style to the layer.

Parameters

brushStylethe brush style to set as default.

See Also

getDefaultBrushStyle

setDefaultLineStyle

setDefaultLineStyle(LineStyle lineStyle)

Sets a default line style to the layer.

Parameters

lineStylethe line style to set as default.

See Also

getDefaultLineStyle

Constants

Layers Type

Layer. TYPE_LOCAL_VECTOR_LAYER

VectorLayer.TYPE_LOCAL_VECTOR_LAYER

Represent a local vector layer.

Layer. TYPE_REMOTE_VECTOR_LAYER

VectorLayer.TYPE_REMOTE_VECTOR_LAYER

Represent a remote vector layer.

Inheritance: EventListener > Layer
VectorLayer(string name)
The VectorLayer constructor.
setDefaultLineStyle(LineStyle lineStyle)
Sets a default line style to the layer.
LineStyle getDefaultLineStyle()
Returns the default line style of the layer.
setDefaultBrushStyle(BrushStyle brushStyle)
Sets a default brush style to the layer.
getDefaultBrushStyle(BrushStyle brushStyle)
Returns the default brush style of the layer.
removeShape(string id)
Removes a specified shape from the layer.
VectorLayer.TYPE_LOCAL_VECTOR_LAYER
Represent a local vector layer.
VectorLayer.TYPE_REMOTE_VECTOR_LAYER
Represent a remote vector layer.
Inheritance: Layer > VectorLayer > LocalVectorLayer
Inheritance: Layer > VectorLayer > RemoteVectorLayer
Inheritance: Layer > LayersCollection > LayersManager
This class defines a line style.
This class defines a brush style.
Inheritance: Shape > Marker
Inheritance: Shape > Poly > Polygon
Inheritance: Shape > Poly > Polyline
Inheritance: Shape > Circle
Adds marker to the layer.