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...

{# Generate a new dynamic map #}
{% set map = googleMaps.map(locations) %}

# 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...

{# Retrieve an existing dynamic map #}
{% set map = googleMaps.getMap(mapId) %}

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(params = {})

Get a list of required JavaScript assets necessary to render dynamic maps.

Optionally add parameters (opens new window) to the Google Maps API URL.

{# Get an array of required JavaScript files #}
{% set assets = googleMaps.getAssets() %}

# loadAssets(params = {})

Load all required JavaScript assets necessary to render dynamic maps.

Optionally add parameters (opens new window) to the Google Maps API URL.

{# Load the required JavaScript files #}
{% do googleMaps.loadAssets({
    'map_ids': '1234'
}) %}

More Info

For more information, check out the documentation on Dynamic Maps.