terikon / marker-animate-unobtrusive

Google Maps markers become animated, unobtrusively
MIT License
222 stars 52 forks source link

animation complete draw #5

Closed enginhazar closed 8 years ago

enginhazar commented 8 years ago

Hi I wrote to animation complete event then, draw polyline

viskin commented 8 years ago

Hi, What do you mean? You want to have animation_complete event for a marker, and do something each time animation finishes?

enginhazar commented 8 years ago

I want to draw the line when you move animation

thank you for your help

2016-01-05 11:40 GMT+02:00 viskin notifications@github.com:

Hi, What do you mean? You want to have animation_complete event for a marker, and do something each time animation finishes?

— Reply to this email directly or view it on GitHub https://github.com/terikon/marker-animate-unobtrusive/issues/5#issuecomment-168948861 .

viskin commented 8 years ago

You can use animationposition_changed event, like this:

      google.maps.event.addListener(mymarker, "animationposition_changed", function () {
         console.log("Marker position: " + mymarker.getAnimationPosition());
         //draw something with mymarker.getAnimationPosition()
      });
viskin commented 8 years ago

Did my solution work for you? If so, I will close the issue.