When creating custom Google Map marker SVGs from div data attribute, how would I control the size of the SVG? By default, Google is making it huge. If I use CSS, the positioning is completely off. The Google API documentation is a bit different from what I have below and I can't figure out how to make it work. Any info is appreciated!
This is the marker HTML:
<div class="marker" data-lat="<?php echo $loc_address_lat; ?>" data-lng="<?php echo $loc_address_lng; ?>" data-marker="/custom-pin-<?php echo $map_marker_color; ?>.svg">
This is the part of the script which creates the marker. My attempts such as 'scaledSize' have failed.
// create marker
var marker = new google.maps.Marker({
position : latlng,
map : map,
//icon : image // Custom image (comment out to disable),
icon: $marker.attr('data-marker'),
scaledSize: new google.maps.Size(10, 10),
});
Here's a fiddle: https://jsfiddle.net/inhouse/3xnz8yg9/2/