Answers.Body: <p>That's a tricky one... Natively, all of the <code>options</code> are applied to all markers equally. But you can do a little workaround using something like this pseudo-code:</p>
  
  <pre><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 %}
  </code></pre>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2014-08-13T19:52:17.353Z
Answers.LastActivityDate: 2014-08-15T09:41:26.660Z
Answers.LastEditDate: 2014-08-15T09:41:26.660Z
Answers.UserDisplayName: Lindsey D
Body: <p>And how do you set a different icon and infoWindow when a lightswitch or entry type?</p>
  
  <pre><code>{% 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) }}
  </code></pre>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2014-08-13T18:38:03.697Z
Comments.Text: Feature request: MarkerClusters with custom icons.
Comments.UserDisplayName: Johannes Lamers
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2014-08-13T19:29:10.947Z
Comments.Text: Thanks for the feature request! Feel free to email me at support@doublesecretagency.com with any others.
Comments.UserDisplayName: Lindsey D
Tags: <plugins><plugin-smartmap>
Title: How do you set a different icon per entry in SmartMap?
ThreadText: # How do you set a different icon per entry in SmartMap?
  
  (Asked by: username_0 on 2014-08-13)
  
  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) }}
  
  ```
  
  **Tags:** plugins, plugin-smartmap
  
  > **Comments:**
  > **username_0**: Feature request: MarkerClusters with custom icons.  
  > **username_1**: Thanks for the feature request! Feel free to email me at support@doublesecretagency.com with any others.  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2014-08-13. Score: 4 | Accepted answer
  
  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 %}
  
  ```
  
  
  ---
  
  