How can I change the size of an individual pin? I tried this code, but getting 'unexpected token errors". Probably something to do using incorrect syntax.

{% js %}
    var markerId = 'smartmap-mapcanvas-1.{{ entry.id }}.addressInformation';
    smartMap.marker[markerId].setOptions({
        'icon':       '{{ icon }}'; 
        'scaledSize:' 'new google.maps.Size(32,32)'
    });
{% endjs %}


The error in the console

var markerId = 'smartmap-mapcanvas-1.550.addressInformation';
smartMap.marker[markerId].setOptions({
    'icon':       '//d1ado4imyxw3fk.cloudfront.net/html/pin-otto-12.png'; 
    'scaledSize:' 'new google.maps.Size(32,32)'
})
Looks like there are a couple of notable errors in your JS:


You have a semi-colon at the end of your icon line. That should be a comma.
On the scaledSize line, you have the colon inside the quote. That should be outside.
Added per Robin's comment... Since you're doing this in JS (not Twig), the new google.maps.Size(32,32) shouldn't be enclosed in quotes. Pass in the JS object directly.


Try something like this...

{% js %}
    var markerId = 'smartmap-mapcanvas-1.{{ entry.id }}.addressInformation';
    smartMap.marker[markerId].setOptions({
        'icon':       '{{ icon }}',
        'scaledSize': new google.maps.Size(32,32)
    });
{% endjs %}