You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Justin Kimbrell edited this page Aug 28, 2014
·
2 revisions
Sometimes you need to be able to fetch the address for your markers for output within your template. To do so, you need to use the GoogleMaps_MapDataModel which is returned by your field type. Loop through the array of GoogleMaps_MarkerModel objects returned by the getMarkers() method.
{% for entry in craft.entries.section('news') %}
{% for marker in entry.yourMapField.getMarkers() %}
{{ marker.address }}<br>
{% endfor %}
{% endfor %}