AtlasCT.com
User Manual v5.0

Layer

Inheritance: EventListener > Layer

The Layer class is the base class of all layers available in the SDK.

See understanding the layers architecture


Summary
Inheritance: EventListener > Layer
The Layer constructor.
Remove the automatic redraw of the layer.
NOTE:
Enable the layer auto redraw if you use a small amount of shapes
If you have a massive use of shapes in your layer it’s recommended to call the redraw method manually after any change in the layer.
Sets the layer to be automatically redrawn after each change of its content.
NOTE:
Enable the layer auto redraw if you use a small amount of shapes
If you have a massive use of shapes in your layer it’s recommended to call the redraw method manually after any change in the layer.
Returns the maximum zoom level the layer can be shown.
Returns the minimum zoom level the layer can be shown.
Returns the name of the layer.
Returns the type of the layer.
Hides the layer from the map.
Returns true if the layer’s automatic redraw is active, false if inactive.
Returns true if the layer is visible, or false if the layer is invisible.
Redraw the layer.
Sets the maximum zoom level the layer can be shown.
Sets the minimum zoom level the layer can be shown.
Shows the layer above the map.
Represent a layer.
Represent a vector layer.
Represent a layers collection.
Represent a layers manager.

Constructors

Layer

Layer(string name)

The Layer constructor.  Creates a new Layer instance.

Parameters

nameThe name of the new layer.

Methods

disableAutoRedraw

disableAutoRedraw()

Remove the automatic redraw of the layer.
NOTE:
Enable the layer auto redraw if you use a small amount of shapes
If you have a massive use of shapes in your layer it’s recommended to call the redraw method manually after any change in the layer.  For example, if you need to add 5000 shapes to the layer, it’s recommended to call the addShape 5000 times and than to call manually to the redraw method.

Parameters

maxZoomA new maximum zoom level for the layer.

See Also

enableAutoRedraw

enableAutoRedraw

enableAutoRedraw()

Sets the layer to be automatically redrawn after each change of its content.
NOTE:
Enable the layer auto redraw if you use a small amount of shapes
If you have a massive use of shapes in your layer it’s recommended to call the redraw method manually after any change in the layer.  For example, if you need to add 5000 shapes to the layer, it’s recommended to call the addShape 5000 times and than to call manually to the redraw method.

See Also

disableAutoRedraw

getMaxZoom

int getMaxZoom()

Returns the maximum zoom level the layer can be shown.

Returns

Maximum zoom level for the layer.

See Also

setMaxZoom

getMinZoom

int getMinZoom()

Returns the minimum zoom level the layer can be shown.

Returns

Minimum zoom level for the layer.

See Also

setMinZoom

getName

string getName()

Returns the name of the layer.

Returns

Layer name.

getType

Layers Types getType()

Returns the type of the layer.

Returns

Layer type. 
The result contains one of the Layers Types values.

hide

hide()

Hides the layer from the map.

See Also

show

isAutoRedrawEnabled

isAutoRedrawEnabled()

Returns true if the layer’s automatic redraw is active, false if inactive.

Returns

True if the layer’s automatic redraw is active, false if inactive.

See Also

enableAutoRedraw, disableAutoRedraw

isVisible

boolean isVisible()

Returns true if the layer is visible, or false if the layer is invisible.

Returns

True if the layer is visible.

See Also

show, hide

redraw

redraw()

Redraw the layer.

See Also

show, hide

setMaxZoom

setMaxZoom(int maxZoom)

Sets the maximum zoom level the layer can be shown.

Parameters

maxZoomA new maximum zoom level for the layer.

See Also

getMaxZoom

setMinZoom

setMinZoom(int minZoom)

Sets the minimum zoom level the layer can be shown.

Parameters

minZoomA new minimum zoom level for the layer.

See Also

getMinZoom

show

show()

Shows the layer above the map.

See Also

hide

Constants

Layers Type

Layer. TYPE_MAP_LAYER

Layer.TYPE_MAP_LAYER

Represent a layer.

Layer. TYPE_VECTOR_LAYER

Layer.TYPE_VECTOR_LAYER

Represent a vector layer.

Layer. TYPE_LAYERS_COLLECTION

Layer.TYPE_LAYERS_COLLECTION

Represent a layers collection.

Layer. TYPE_LAYERS_MANAGER

Layer.TYPE_LAYERS_MANAGER

Represent a layers manager.

The EventListener class helps you to register event handlers defined by this API.
Some of the classes that inherit from this class are: Map, OverviewMap, LayersManager
Layer(string name)
The Layer constructor.
Layers Types getType()
Returns the type of the layer.
string getName()
Returns the name of the layer.
enableAutoRedraw()
Sets the layer to be automatically redrawn after each change of its content.
NOTE:
Enable the layer auto redraw if you use a small amount of shapes
If you have a massive use of shapes in your layer it’s recommended to call the redraw method manually after any change in the layer.
redraw()
Redraw the layer.
disableAutoRedraw()
Remove the automatic redraw of the layer.
NOTE:
Enable the layer auto redraw if you use a small amount of shapes
If you have a massive use of shapes in your layer it’s recommended to call the redraw method manually after any change in the layer.
isAutoRedrawEnabled()
Returns true if the layer’s automatic redraw is active, false if inactive.
setMaxZoom(int maxZoom)
Sets the maximum zoom level the layer can be shown.
int getMaxZoom()
Returns the maximum zoom level the layer can be shown.
setMinZoom(int minZoom)
Sets the minimum zoom level the layer can be shown.
int getMinZoom()
Returns the minimum zoom level the layer can be shown.
show()
Shows the layer above the map.
hide()
Hides the layer from the map.
boolean isVisible()
Returns true if the layer is visible, or false if the layer is invisible.
Layer.TYPE_MAP_LAYER
Represent a layer.
Layer.TYPE_VECTOR_LAYER
Represent a vector layer.
Layer.TYPE_LAYERS_COLLECTION
Represent a layers collection.
Layer.TYPE_LAYERS_MANAGER
Represent a layers manager.
Adds marker to the layer.