Dynamic Maps
# map(locations = [], options = {})
Central to the creation of all dynamic maps. Use this method to create a new map, before further manipulating the map object. See the complete method details...
# getMap(mapId)
Call up an existing map using this method. Once you've retrieved the map object, you are free to manipulate it normally. See the complete method details...
Manually Loading Assets
The methods below (getAssets
and loadAssets
) are only relevant if you are preventing the required JS files from being loaded automatically. See more about loading assets...
# getAssets(service, params = {})
Get a list of required JavaScript assets necessary to render dynamic maps.
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.
{# Get an array of required JS and/or CSS files #}
{% set assets = mapbox.getAssets('maps') %}
# loadAssets(service, params = {})
Load all required JavaScript assets necessary to render dynamic maps.
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.
More Info
For more information, check out the documentation on Dynamic Maps.