Documentation
Reference
2.1.55 (current version)
collection
interactivityModel
Interfaces

map.layer.Manager

Extends ILayer, IMapObjectCollection.

Map layers manager.

See Map.layers

Constructor | Fields | Events | Methods

Constructor

map.layer.Manager(map[, options])

Creates an instance of the class for working with map layers. Each map already has its own layer manager, available as map.layers. Don't instantiate new instances of this class unless necessary.

Parameters:

ParameterDefault valueDescription
map *
[no-highlight[

* Mandatory parameter/option.

]no-highlight]

Type: Map

Map

options

Type: Object

Map layer options. The map.layers options can be used to make settings for layers that have been added to the map. Options for hotspot layers are set using the "hotspotLayer" prefix.

options.trafficImageZIndex 201

Type: Number

The z-index of the traffic picture layer.

options.trafficInfoZIndex 1

Type: Number

Priority of the hotspot layer of info points.

options.trafficJamZIndex 0

Type: Number

Priority of the hotspot layer for traffic jams.

* Mandatory parameter/option.

Fields

NameTypeDescription
eventsIEventManager

Event manager.

Inherited from IEventEmitter.

optionsIOptionManager

Options manager.

Inherited from ICustomizable.

Events

NameDescription
add

A child object was added.

Inherited from ICollection.

brightnesschange

Layer brightness change event.

Inherited from ILayer.

copyrightschange

Event for changes to available copyright information.

Inherited from ILayer.

mapchange

Map reference changed. Data fields:

  • oldMap - Old map.
  • newMap - New map.

Inherited from IParentOnMap.

optionschange

Change to the object options.

Inherited from ICustomizable.

parentchange

The parent object reference changed.

Data fields:

  • oldParent - Old parent.
  • newParent - New parent.

Inherited from IChild.

remove

A child object was deleted.

Inherited from ICollection.

zoomrangechange

Event for changes to available information about the zoom level range.

Inherited from ILayer.

Methods

NameReturnsDescription
add(object)

ICollection

Adds a child object to the collection.

Inherited from ICollection.

each(callback[, context])

Iterates through all the items in the collection and calls a handler function for each of them.

getBrightness()

Number

Optional method.

Inherited from ILayer.

getCopyrights(coords, zoom)

vow.Promise

Optional method. Requests information about copyrights at the specified point with the specified zoom.

Inherited from ILayer.

getIterator()

IIterator

Returns iterator for the collection.

Inherited from ICollection.

getMap()

Map

Returns reference to the map.

Inherited from IParentOnMap.

getParent()

IControlParent|null

Returns link to the parent object, or null if the parent element was not set.

Inherited from IChildOnMap.

getZoomRange(point)

vow.Promise

Optional method. Checks the available range of zoom levels at the specified point. If there is data, the returned promise object will be resolved and will pass as a result an array of two numbers - the minimum and maximum zoom level available at the point. If there is no data, the promise is rejected with an error.

Inherited from ILayer.

remove(object)

ICollection

Removes a child object from the collection.

Inherited from ICollection.

setParent(parent)

IChildOnMap

Sets the parent object. If the null value is passed, the manager element will only be deleted from the current parent object.

Inherited from IChildOnMap.

Methods details

each

{} each(callback[, context])

Iterates through all the items in the collection and calls a handler function for each of them.

Parameters:

ParameterDefault valueDescription
callback*
[no-highlight[

* Mandatory parameter/option.

]no-highlight]

Type: Function

Handler function.

context

Type: Object

Context for the function.

* Mandatory parameter/option.