I am using jupyter notebook to animate a marker that moves along an ant path. I am using ipyleaflet and ipywidgets. I have added a slider widget (speed_slider) to my map, to allow me change the speed of the animation. My animation is using a for loop code as shown in below code.
for i in ant_path.locations:
mark.location = i
sleep(speed_slider.value)
I am able to set the animation speed before running the cell that contains the above for loop code, but I am not able to change the speed during animation. Please any suggestions on how change the animation speed during the animation runtime, using the slider.