Global

Methods

addLayer()

Adds a single layer to the map.

addLayers()

Adds multiple layers to the map.

addSource()

Adds a single source to the map and caches it.

addSources()

Adds multiple sources to the map.

addTextLayer()

Adds text layers for labeling. (Currently disabled – remove the "return;" to enable.)

init()

Initializes the object with provided options and refreshes it.

moveLayers()

Moves the specified layers on the map.

onClusterClick()

Handles cluster clicks by expanding clusters.

onLayerMouseout()

Handles mouseout events for layers. (Currently commented out – remove comments to enable.)

onLayerMouseover()

Handles mouseover events for layers. (Currently commented out – remove comments to enable.)

refresh()

Refreshes the map by removing and re-adding layers and sources.

removeLayer()

Removes a single layer from the map.

removeLayers()

Removes multiple layers. Accepts an array of layer objects or IDs.

removeSource()

Removes a single source from the map.

removeSources()

Removes sources from the map.

removeTextLayer()

Removes text layers (layers with metadata.text).