I find lots of answers on this question but not one that works when using .gif images and not markers. To use .gif images (and also animated gifs) I use code (which works)
var image = {
url: 'img/RedFlashYacht.gif',
size: new google.maps.Size(75, 75),
origin: new google.maps.Point(0, 0),
anchor: new google.maps.Point(0, 32),
scaledSize: new google.maps.Size(50, 50)
};
marker = new google.maps.Marker({
position: pos ,
map: map,
icon: image,
store_id: mkrID,
optimized: false
});
//for anyone who has not used .gif, the line 'optimized: false' is critical
What I want to do now is rotate the gif image (to a specified angle, not a constant rotate [that I can do as animated gif]). Dispite setting the ID for the image with 'store_id: mkrID,' var mkrID being previously created, and I can read it back with code marker.get('store_id') so I know it's been set. I cannot access the image with document.getElementById. nor can I get any of the google maps API rotate eample code to work either. Examples I find seem to be for v2 or relate to google maps own markers, not custom images using a gif.
Has anyone been able to rotate a gif image in a google map?