How do you set a different icon per entry in SmartMap? And how do you set a different icon and infoWindow when a lightswitch or entry type?

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

{% set options = {
    'zoom': 5,
    'height': 750,
    'markerInfo': '_includes/infoBubble',
    markerOptions: {
        icon: 'http://maps.google.com/mapfiles/ms/icons/green-dot.png'
    },
} %}

{{ craft.smartMap.map(locations, options) }}
That's a tricky one... Natively, all of the options are applied to all markers equally. But you can do a little workaround using something like this pseudo-code:

{% set markerIconJs  %}

    // On page load
    $(function () {

    {% for entry in locations %}

        {% if entry.lightswitch %}

            // JavaScript: Override the default icon with your own
            smartMap.marker['smartmap-mapcanvas-1.{{ entry.id }}.myAddressField'].setOptions({
                icon: '{{ entry.icon }}'
            });

        {% endif %}

    {% endfor %}

    });

{% endset %}

{% includeJs markerIconJs %}