Icons
Geocode
LBS
Search
Route
Points
Miscellaneous
Index

LocalVectorLayer

Inheritance: Layer > VectorLayer > LocalVectorLayer

The LocalVectorLayer class allows you to add various of shapes (Polygon, Polyline, Circle, Marker) above the map.
In order to add a LocalVectorLayer to the map, you should add it to a LayersCollection object, which should attach to the map.
You can also add the layer directly to the map’s LayersManager object, that inherit from LayersCollection.

See understanding the layers architecture


Summary
Inheritance: Layer > VectorLayer > LocalVectorLayer
The LocalVectorLayer constructor.
Returns the shape whose ID is specified.
Returns all the shapes the layer holds.
Removes all the shapes from the layer.
Removes the given shape from the layer.
Removes the shape whose ID is specified.
Sets the clustering level of the layer’s markers drawing method.
When you set the clustering level to high, the layer clusters a bunch of close markers and draw them as one marker
When you set the clustering level to none, the layer doesn’t use the clustering method at all.
Disable the layer clustering.
Set the layer clustering to be low.
Set the layer clustering to be medium.
Set the layer clustering to be high.

Constructors

LocalVectorLayer

LocalVectorLayer(string name)

The LocalVectorLayer constructor.

Parameters

nameThe name of the new local vector layer

Methods

getShapeById

Shape getShapes(string id)

Returns the shape whose ID is specified.

Parameters

idstring representing the unique ID of the element being sought.

Returns

A reference to the shape instance, or null if there is no shape with the specified ID.

getShapes

Array[] Shape getShapes()

Returns all the shapes the layer holds.

Returns

Array of shapes.

removeAll

removeAll()

Removes all the shapes from the layer.

removeShape

removeShape(shape shape)

Removes the given shape from the layer.

Parameters

shapeThe shape to be removed.

removeShapeById

Shape removeShapeById(string id)

Removes the shape whose ID is specified.

Parameters

idstring representing the unique ID of the element being sought.

Returns

A reference to the shape instance, or null if there is no shape with the specified ID.

setClustering

setClustering(Clustering Levels clusteringLevel)

Sets the clustering level of the layer’s markers drawing method.
When you set the clustering level to high, the layer clusters a bunch of close markers and draw them as one marker
When you set the clustering level to none, the layer doesn’t use the clustering method at all.

Parameters

clusteringLevelThe new clustering level.

Clustering Levels

LocalVectorLayer. CLUSTERING_NONE

LocalVectorLayer.CLUSTERING_NONE

Disable the layer clustering.

LocalVectorLayer. CLUSTERING_LOW

LocalVectorLayer.CLUSTERING_LOW

Set the layer clustering to be low.

LocalVectorLayer. CLUSTERING_MEDIUM

LocalVectorLayer.CLUSTERING_MEDIUM

Set the layer clustering to be medium.

LocalVectorLayer. CLUSTERING_HIGH

LocalVectorLayer.CLUSTERING_HIGH

Set the layer clustering to be high.

Inheritance: EventListener > Layer
Inheritance: Layer > VectorLayer
LocalVectorLayer(string name)
The LocalVectorLayer constructor.
setClustering(Clustering Levels clusteringLevel)
Sets the clustering level of the layer’s markers drawing method.
When you set the clustering level to high, the layer clusters a bunch of close markers and draw them as one marker
When you set the clustering level to none, the layer doesn’t use the clustering method at all.
removeShape(shape shape)
Removes the given shape from the layer.
Shape removeShapeById(string id)
Removes the shape whose ID is specified.
removeAll()
Removes all the shapes from the layer.
Array[] Shape getShapes()
Returns all the shapes the layer holds.
Shape getShapes(string id)
Returns the shape whose ID is specified.
LocalVectorLayer.CLUSTERING_NONE
Disable the layer clustering.
LocalVectorLayer.CLUSTERING_LOW
Set the layer clustering to be low.
LocalVectorLayer.CLUSTERING_MEDIUM
Set the layer clustering to be medium.
LocalVectorLayer.CLUSTERING_HIGH
Set the layer clustering to be high.
Inheritance: Layer > LayersCollection
Inheritance: Layer > LayersCollection > LayersManager
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.