gauris26 / flutter_animarker

Sometimes you need more than place a marker in the maps, you required a smoothly through Google Maps canvas.
https://gaurisjavier.com/
BSD 3-Clause "New" or "Revised" License
57 stars 52 forks source link

Does not respond to change in markerSet / or markerMap.values() #13

Open Sam-Guru-In-Training opened 3 years ago

Sam-Guru-In-Training commented 3 years ago

There appears to be no way to stop the animation.

If I

    setState(() {
      rippleAnimationActive = false;
      animatedMarkerSet.clear(); 
}

Animarker( isActiveTrip: rippleAnimationActive,

None of these work.

I've tried using the provided code too, trying to deactivate the ripple by posting a locationUpdate

  void newLocationUpdate(LocationDetails oldLocation) {
    var marker = RippleMarker(
      markerId: MarkerId(oldLocation.name),
      position: oldLocation.latLng,
      ripple: false,
    );
    setState(() => animatedMarkerMap[MarkerId(oldLocation.name)] = marker);
    //setState(() => markers[kMarkerId] = marker);
  }

But it has no effect. It seems to detach from the dataset that initialises an animation.

While I would love to deactivate the animation it would be even better to have the animation timed, given a duration of say 5 seconds then auto stopping.

gauris26 commented 3 years ago

Thank you for raising the issue. Let me check it out.

gauris26 commented 3 years ago

Let me get the issue straight: are you referring to ripple animation? Or change of position animation?

Sam-Guru-In-Training commented 3 years ago

Ripple animation.

I have a stationary marker, I wish to use the animation to make it pop from a crowd of other markers.

But I need an easy way to turn off the ripple, even better would be a way to set a duration, or number of animation cycles.

Both would be epic.

x Sam

Written on mobile please forgive errors

On Tue, 11 May 2021, 00:13 Gauris Javier, @.***> wrote:

Let me get the issue straight: are you referring to ripple animation? Or change of position animation?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/gauris26/flutter_animarker/issues/13#issuecomment-837476900, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACEZUNSJSV3QNEXL5QREWYLTNBSBBANCNFSM44PQ5OYA .

gauris26 commented 3 years ago

I upload a new beta prerelease version, please have a look at the property rippleIdleAfter for setting a timeout for ripple animation on static marker. I would appreciate you're feedback.

Sam-Guru-In-Training commented 2 years ago

Well, that's brilliant Gauris! Unfortunately, I can't get it to respect the property - rippleIdleAfter just gets ignored and it turns off after 30 seconds, a big improvement but still leads to multiple active markers and glitching ripples.

Maybe you have to deactivate the ripple animation on map instantiation or something, maybe that overrides the property? I'd LOVE LOVE LOVE to have a timeout working.