ILayer
Extends IChildOnMap, ICustomizable, IEventEmitter.
Interface for a map layer.
Constructor | Fields | Events | Methods
Constructor
ILayer()
Fields
Name |
Type |
Description |
Event manager. Inherited from IEventEmitter. |
||
Options manager. Inherited from ICustomizable. |
Events
Name |
Description |
Layer brightness change event. |
|
Event for changes to available copyright information. |
|
Change to the object options. Inherited from ICustomizable. |
|
The parent object reference changed. Data fields:
Inherited from IChild. |
|
Tile upload status change event. Data fields:
|
|
Event for changes to available information about the zoom level range. |
Methods
Name |
Returns |
Description |
Number |
Optional method. |
|
Optional method. Requests information about copyrights at the specified point with the specified zoom. |
||
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. |
||
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.
tileloadchange
Tile upload status change event. Data fields:
- readyTileNumber - Number of ready tiles. A tile is considered ready when it is downloaded and rendered. Type: Number.
- totalTileNumber - Total number of visible tiles. Type: Number.
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:
Parameter |
Default value |
Description |
— |
Type: Number[] The point on the map that copyright information is being requested for. |
|
|
— |
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:
Parameter |
Default value |
Description |
— |
Type: Number[] Point |
* Mandatory parameter/option.
Mandatory parameter/option.