Documentation
Reference
2.1.50 (current version)
collection
interactivityModel
Interfaces

ILayer

Extends IChildOnMap, ICustomizable, IEventEmitter.

Interface for a map layer.

Constructor | Fields | Events | Methods

Constructor

ILayer()

Fields

NameTypeDescription
eventsIEventManager

Event manager.

Inherited from IEventEmitter.

optionsIOptionManager

Options manager.

Inherited from ICustomizable.

Events

NameDescription
brightnesschange

Layer brightness change event.

copyrightschange

Event for changes to available copyright information.

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.

zoomrangechange

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

Methods

NameReturnsDescription
getBrightness()

Number

Optional method.

getCopyrights(coords, zoom)

vow.Promise

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

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.

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.

Events details

brightnesschange

Layer brightness change event.

copyrightschange

Event for changes to available copyright information.

zoomrangechange

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

Methods details

getBrightness

{Number} getBrightness()

Optional method.

Returns the layer brightness value from 0 to 1 (0 is zero brightness, and 1 is maximum brightness). The total brightness of the layers added to the map determines which color is selected for the logo and copyrights on the map.

getCopyrights

{vow.Promise} getCopyrights(coords, zoom)

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

Returns Promise that will be resolved and will pass as a result an array of strings or DOM elements with information about copyrights.

Parameters:

ParameterDefault valueDescription
coords*
[no-highlight[

* Mandatory parameter/option.

]no-highlight]

Type: Number[]

The point on the map that copyright information is being requested for.

zoom*
[no-highlight[

* Mandatory parameter/option.

]no-highlight]

Type: Number

The zoom level that copyright information is being requested for.

* Mandatory parameter/option.

getZoomRange

{vow.Promise} getZoomRange(point)

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.

Returns Promise object.

Parameters:

ParameterDefault valueDescription
point*
[no-highlight[

* Mandatory parameter/option.

]no-highlight]

Type: Number[]

Point

* Mandatory parameter/option.