Mapbox API

# getApiUrl(service, params = {})

Get the URL used internally for pinging the Mapbox JavaScript API.

The service value specifies which API URL to use. It may be set to either maps or search.

Optionally add params to the Mapbox API URL.

{% set apiUrl = mapbox.getApiUrl('maps') %}

# getAccessToken()

Get the access token.

{% set accessToken = mapbox.getAccessToken() %}

# setAccessToken(token)

Override the access token.

{% do mapbox.setAccessToken('YOUR_ACCESS_TOKEN') %}