Answers.Body: <p>As of Smart Map <strong>v2.4.2</strong>, it is now possible to build more elaborate markers using a nested syntax for the <code>markerOptions</code> value. Try something like this...</p>
  <pre><code>{% set options = {
    zoom: 6,
    markerOptions: {
      icon: {
        url: 'https://www.mysite.com/images/map/marker.png',
        scaledSize: 'new google.maps.Size(20,20)'
      }
    }
  } %}
  </code></pre>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2018-01-31T16:33:12.283Z
Answers.Text: a ha. I hadn't seen the update yet. (I'm on 2.4.1.) Thank you, Lindsey.
Answers.UserDisplayName: SamC
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-01-31T06:37:53.087Z
Answers.LastActivityDate: 2021-01-01T06:57:21.913Z
Answers.LastEditDate: 2021-01-01T06:57:21.913Z
Answers.UserDisplayName: Lindsey D
Body: <p>I'm trying to figure out how to set the size of a marker on a map.</p>
  
  <pre><code>{% set options = {
    zoom: 6,
    markerOptions: {
      icon: 'https://www.mysite.com/images/map/marker.png',
      scaledSize: 'new google.maps.Size(20,20)'
    },
  } %}
  </code></pre>
  
  <p>It pulls in my marker file correctly, but I don't know what the correct option is to make it scale. </p>
  
  <p>It's a 40px square image, but I want it to show at 20px, so it doesn't look like garbage on a retina screen.</p>
  
  <p>Help?</p>
  
Tags: <plugin-smartmap><google-maps>
Title: Smart Map - setting an icon size
ThreadText: # Smart Map - setting an icon size
  
  (Asked by: username_0 on 2018-01-30)
  
  I'm trying to figure out how to set the size of a marker on a map.
  
  ```
  {% set options = {
    zoom: 6,
    markerOptions: {
      icon: 'https://www.mysite.com/images/map/marker.png',
      scaledSize: 'new google.maps.Size(20,20)'
    },
  } %}
  
  ```
  
  It pulls in my marker file correctly, but I don't know what the correct option is to make it scale.
  
  It's a 40px square image, but I want it to show at 20px, so it doesn't look like garbage on a retina screen.
  
  Help?
  
  **Tags:** plugin-smartmap, google-maps
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2018-01-31. Score: 2 | Accepted answer
  
  As of Smart Map **v2.4.2**, it is now possible to build more elaborate markers using a nested syntax for the `markerOptions` value. Try something like this...
  
  ```
  {% set options = {
    zoom: 6,
    markerOptions: {
      icon: {
        url: 'https://www.mysite.com/images/map/marker.png',
        scaledSize: 'new google.maps.Size(20,20)'
      }
    }
  } %}
  
  ```
  
  > **Comments:**
  > **username_0**: a ha. I hadn't seen the update yet. (I'm on 2.4.1.) Thank you, username_1.  
  
  ---
  
  