Smart Map - Setting single map with multiple pins I have a Smart Map field in a section and am trying to output multiple results (pins) to a single map.
This code will output multiple maps (one map per pin)
{% for mapEntry in craft.entries.section('markets') %}
{% set options = {
    height: 500,
    zoom: 14,
    draggable: false,
    markerInfo: '_includes/mapInfoBubble',
    markerOptions: {
        icon: 'http://maps.google.com/mapfiles/ms/icons/green-dot.png'
    },
    infoWindowOptions: {
        maxWidth: 200
    }
} %}

{% set locations = craft.entries.section('markets').marketAddress.find() %}

{{ craft.smartMap.map(locations, options) }}

{% endfor %}

So essentially I am trying to get the {{ craft.smartMap.map(locations, options) }} outside the for loop.
{% set locations = '' %}
{% set options = '' %}
{% for mapEntry in craft.entries.section('markets') %}
{% set options = {
    height: 500,
    zoom: 14,
    draggable: false,
    markerInfo: '_includes/mapInfoBubble',
    markerOptions: {
        icon: 'http://maps.google.com/mapfiles/ms/icons/green-dot.png'
    },
    infoWindowOptions: {
        maxWidth: 200
    }
} %}
{% set locations = craft.entries.section('markets').marketAddress.find() %}
{{ craft.smartMap.map(locations, options) }}
{% endfor %}

But this only results in a single pin (most recent entry).
Can't get my head around this. Any assistance most welcome.
According to the docs, locations has to be an array of elements or an ElementCriteriaModel
if you want to display multiple markers.
{% set mapEntries = craft.entries.section('markets') %}
{{ craft.smartMap.map(mapEntries, options) }}