flutter_animarker icon indicating copy to clipboard operation
flutter_animarker copied to clipboard

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

Open Sam-Guru-In-Training opened this issue 4 years ago • 5 comments
trafficstars

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.

Sam-Guru-In-Training avatar May 09 '21 19:05 Sam-Guru-In-Training

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

gauris26 avatar May 10 '21 23:05 gauris26

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

gauris26 avatar May 10 '21 23:05 gauris26

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 .

Sam-Guru-In-Training avatar May 10 '21 23:05 Sam-Guru-In-Training

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.

gauris26 avatar Jul 06 '21 13:07 gauris26

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.

Sam-Guru-In-Training avatar Mar 22 '22 23:03 Sam-Guru-In-Training