✊🏿 Black Lives Matter. Please consider donating to Black Girls Code today.
⚾️ It's finally Baseball season! Root for the home team... & Register for our Sports Analytics Webinar!

Observe Zoom event on FigureWidget showing a mapbox?

I have a figurewidget that includes a Scatter Mapbox object. When I zoom in and out, I’d like to have a chance to make some adjustments to my markers. But I cannot find any sort of plotly_zoom documentation. Indeed, I have found many, many threads asking about doing something interactive based on zoom, but most don’t get answered. I hope this one does!

I’d like to do something like this:

def mw_zoom(change):
    # do something really great

# Mainwidget is a FigureWidget with two children;
# children[0] provides all the interaction buttons
# children[1] provides the interactive mapbox display using open street map
mainwidget.children[1].observe(mw_zoom, names="zoom")

# Nothing great happens when I zoom or pan inside the mapbox window

See my example code that captures the zoom event on a Plotly map and uses the zoom-event data to update another map here: Dash - two maps zoom level synchronization - #3 by DeejL