I am trying to add the functionality to create a rotated animated marker. My code is attached (I extended the AnimatedMarker.js src).
When I initialize a new animatedMarker with an angle, the marker remains unchanged.:
add_animated_marker = function(tpls) {
var a_marker, poly;
poly = tpls[0][1];
a_marker = L.animatedMarker(poly.getLatLngs(), {
icon: carIcon,
angle: 90,
onEnd: function() {
var rest;
map.removeLayer(this);
rest = tpls.slice(1);
if (rest.length > 0) {
add_animated_marker(rest);
}
}
});
map.addLayer(a_marker);
};
I have noticed that the transform attribute is not being updated (or is getting overwritten). Any ideas on what I am missing?
Thanks!