Add a layer to the map style. The layer will be inserted before the layer with
ID before, or appended if before is omitted.
The style layer to add.
Optional before: stringID of an existing layer to insert before
Style setter options.
Add a sprite.
The id of the desired sprite
The url to load the desired sprite from
The style setter options
Optional completion: ((err) => void)The completion handler
Return the style layer object with the given id.
id of the desired layer
a layer, if one with the given id exists
Adds a listener to a specified event type.
The event type to add a listen for.
The function to be called when the event is fired.
The listener function is called with the data object passed to fire,
extended with target and type properties.
Adds a listener that will be called only once to a specified event type.
The listener will be called first time the event fires after the listener is registered.
The event type to listen for.
Optional listener: ListenerThe function to be called when the event is fired the first time.
this or a promise if a listener is not provided
Set a new value for the style's sprite.
new sprite value
style setter options
Optional completion: ((err) => void)the completion handler
Update this style's state to match the given style JSON, performing only the necessary mutations.
May throw an Error ('Unimplemented: METHOD') if the mapbox-gl-style-spec diff algorithm produces an operation that is not supported.
true if any changes were made; false otherwise
The Style base class