I\'m working with Google Map Javascript API and I\'m trying to create a custom Marker with a custom Icon which works with rotation,
var marker = new google.maps.
1) No, as the Icon object doesn't have a rotation
property, and
2) yes, you can, but for this, you need to use a Symbol object and the SVG path notation. You can check this answer and this example for more info.
var symbol = {
path: "M0 0 H 90 V 90 H 0 L 0 0",
fillColor: '#FF0000',
fillOpacity: .5,
anchor: new google.maps.Point(0, 0),
strokeWeight: 0,
scale: .5,
rotation: 45
}
var marker = new google.maps.Marker({
position: new google.maps.LatLng(0, 0),
map: map,
icon: symbol
});