I am having an issue resizing a custom icon/markers on google maps, I want to set the icon size to be 15x15.
You would normally use the below to set the size, but I not sure how to apply this to my custom icon in the fiddle below.
scaledSize: new google.maps.Size(25, 25)
Here is my fiddle http://jsfiddle.net/ww17amv2/82/
Thanks for any help or suggestions.
You need add the size when the icon is set:
var marker = new google.maps.Marker({
position: new google.maps.LatLng(locations[i][1], locations[i][2]),
map: map,
optimized: false,
icon: {url:icons[iconCounter], scaledSize: new google.maps.Size(70, 70)},
title: 'Click to zoom'
});
See: Change Google map marker icon size
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With