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:
Parameter |
Default value |
Description |
|
— |
Type: Map Map |
— |
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. |
|
201 |
Type: Number The z-index of the traffic picture layer. |
|
1 |
Type: Number Priority of the hotspot layer of info points. |
|
0 |
Type: Number Priority of the hotspot layer for traffic jams. |
* Mandatory parameter/option.
Fields
Name |
Type |
Description |
Event manager. Inherited from IEventEmitter. |
||
Options manager. Inherited from ICustomizable. |
Events
Name |
Description |
A child object was added. Inherited from ICollection. |
|
Layer brightness change event. Inherited from ILayer. |
|
Event for changes to available copyright information. Inherited from ILayer. |
|
Map reference changed. Data fields:
Inherited from IParentOnMap. |
|
Change to the object options. Inherited from ICustomizable. |
|
The parent object reference changed. Data fields:
Inherited from IChild. |
|
A child object was deleted. Inherited from ICollection. |
|
Tile upload status change event. Data fields:
Inherited from ILayer. |
|
Event for changes to available information about the zoom level range. Inherited from ILayer. |
Methods
Name |
Returns |
Description |
Adds a child object to the collection. Inherited from ICollection. |
||
Iterates through all the items in the collection and calls a handler function for each of them. |
||
Number |
Optional method. Inherited from ILayer. |
|
Optional method. Requests information about copyrights at the specified point with the specified zoom. Inherited from ILayer. |
||
Returns iterator for the collection. Inherited from ICollection. |
||
getMap() |
Returns reference to the map. Inherited from IParentOnMap. |
|
IParentOnMap|null |
Returns link to the parent object, or null if the parent element was not set. Inherited from IChildOnMap. |
|
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. |
||
Removes a child object from the collection. Inherited from ICollection. |
||
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:
Parameter |
Default value |
Description |
— |
Type: Function Handler function. |
|
— |
Type: Object Context for the function. |
* Mandatory parameter/option.
Mandatory parameter/option.