I can't seem to loop animated gifs with the Google Maps API. It plays the animation the first time around but will not play it again after that.
Can anyone point me in the right direction? I have a lot of code in this file so I have dragged out the important bits, I'll happily put up some more if needed.
var marker = new google.maps.MarkerImage(
'library/img/gmap_marker.gif',
new google.maps.Size(100, 100),
new google.maps.Point(0, 0),
new google.maps.Point(100, 100)
);
var shadow = new google.maps.MarkerImage(
'library/img/gmap_shadow.png',
new google.maps.Size(100, 100),
new google.maps.Point(0, 0),
new google.maps.Point(100, 100)
);
// set the personmarker
var person = new google.maps.Marker({
position: currentPos,
icon: marker,
draggable: false,
raiseOnDrag: false,
shadow: shadow,
animation: google.maps.Animation.DROP,
map: app.map,
optimized: false
});
Key is to set
optimized: false
, but since you already have and its not working - I tested to create own simple example and it worked.Edit it as you please to suit your needs, you can also try to swap using of
google.maps.MarkerImage
togoogle.maps.icon
because MarkerImage seems to be deprecated see : MarkerImage and Icon.Good luck with da code.!