Q:

Google Maps API v3 Resize SVG Path Icon With Zoom

I put three icons on a map and they represent buildings on the map, but when I zoom into or out of the map the icon sizes are the same and they no longer correspond to the actual building size on the map. Now I know how to resize png icons by pixels but is there a way to keep the vectoral icons proportional to the map zoom while zooming in-out or do I have to manipulate scale property of the Icon object by catching the zoom event? Thanks.
for (var cnt = 0; cnt < pathArr.length; cnt++) {
    var path = {
        path: pathArr[cnt].Path,
        fillColor: "#CCCCCC",
        fillOpacity: 1,
        strokeColor: "#666666",
        strokeWeight: 4,
        scale: 1
    };

    var pos = new google.maps.LatLng(pathArr[cnt].Lat, pathArr[cnt].Lng);
    var marker = new google.maps.Marker({
        position: pos,
        icon: path,
        map: this.Gmap
    });

    this.MapMarkers.push(marker);
}

A:

The best way to achieve what I want is to use custom overlays and svg:
https://developers.google.com/maps/documentation/javascript/customoverlays

