M/layer/Mapbox~Mapbox


import Mapbox from 'M/layer/Mapbox';

Main constructor of the class. Creates a Mapbox layer with parameters specified by the user

new Mapbox(userParameters, options, vendorOptions)

facade/js/layer/Mapbox.js, line 28
Name Type Description
userParameters string | Mx.parameters.Mapbox

parameters

options Mx.parameters.LayerOptions

options provided by the user

vendorOptions Object

vendor options for the base library

Extends

  • M.Layer

Methods

equals(obj){boolean}

facade/js/layer/Mapbox.js, line 182

Checks if an object is equal to this layer, which means that it is a Mapbox Layer instance and has the same url, name and options.

Name Type Description
obj object

Object to compare

Returns:
True if equal, false otherwise

setName(newName)

facade/js/layer/Mapbox.js, line 169

Sets the name of the layer

Name Type Description
newName String

Name

setTileLoadFunction(func)

facade/js/layer/Mapbox.js, line 145

This function sets the tileLoadFunction On the implementation

Name Type Description
func function

Function to override

setURL(newURL)

facade/js/layer/Mapbox.js, line 157

Sets the url of the layer

Name Type Description
newURL String

URL