I am trying to initiate multiple Google Map instances on a page.
I need to set a dynamic ID for each one. I've tried doing it with loop.index
but no joy.
{% for marker in event.eventMap.getMarkers() %}
<div class="google-maps">
{% set options = {
id: 'map',
width: '100%',
height: '150px',
options: {
disableDoubleClickZoom: true,
maxZoom: 15,
minZoom: 5,
scrollwheel: false
}
} %}
{{ craft.googleMaps.map() }}
{{ craft.googleMaps.data('map', event.eventMap) }}
</div>
{% endfor %}