Class

MapboxGLButtonControl

button~MapboxGLButtonControl(className, title, textContent, id, eventHandler)

Button Control implemented as ES6 class
Constructor

# new MapboxGLButtonControl(className, title, textContent, id, eventHandler)

Create a Mapbox GL Button object.
Parameters:
Name Type Description
className string The className value.
title string The title value.
textContent string The textContent value.
id string The id value.
eventHandler event The eventHandler value.

View Source button.js, line 9

Methods

# onAdd(map) → {HTMLDivElement}

On Add function.
Parameters:
Name Type Description
map map The map object.

View Source button.js, line 37

The this.container div element.
HTMLDivElement

# onRemove()

On Remove function.

View Source button.js, line 56