Skip to main content
added 10 characters in body
Source Link
Francisco Puga
  • 4.6k
  • 23
  • 43

At least at Folium v0.13 that's not seem to be possible. Check issue #1578 in folium's github repository.

If you are using Jupyter to render your maps, I suggest you to try a different library like ipyleaflet. It has a great interactive features. Check this blog post for an example of what you ask for. I paste here a resume:

# Define a callback function for an event on a marker
def handle_observe(event):
    print(event)

# Call the callback function whenever the location of the marker changes
marker.observe(handle_observe, 'location')

At least at Folium v0.13 that's not seem to be possible. Check issue #1578 in folium's github repository.

If you Jupyter to render your maps, I suggest you to try a different library like ipyleaflet. It has a great interactive features. Check this blog post for an example of what you ask for. I paste here a resume:

# Define a callback function for an event on a marker
def handle_observe(event):
    print(event)

# Call the callback function whenever the location of the marker changes
marker.observe(handle_observe, 'location')

At least at Folium v0.13 that's not seem to be possible. Check issue #1578 in folium's github repository.

If you are using Jupyter to render your maps, I suggest you to try a different library like ipyleaflet. It has a great interactive features. Check this blog post for an example of what you ask for. I paste here a resume:

# Define a callback function for an event on a marker
def handle_observe(event):
    print(event)

# Call the callback function whenever the location of the marker changes
marker.observe(handle_observe, 'location')
Source Link
Francisco Puga
  • 4.6k
  • 23
  • 43

At least at Folium v0.13 that's not seem to be possible. Check issue #1578 in folium's github repository.

If you Jupyter to render your maps, I suggest you to try a different library like ipyleaflet. It has a great interactive features. Check this blog post for an example of what you ask for. I paste here a resume:

# Define a callback function for an event on a marker
def handle_observe(event):
    print(event)

# Call the callback function whenever the location of the marker changes
marker.observe(handle_observe, 'location')