I would like to toggle between “open-street-map” and “satellite” in my map plot layout view, is there a way just to change the layout from the Scattermapbox plot?
In my first callback, I do a SQL query make data frame then plot a map.
you can’t update just the layout right now, but we’d like to make it possible to update sub properties.
until then, your backend could provide the figure to a store, and then you could have a clientside callback that merges your layout change with the figure in the store to update a graph. that’ll save a round trip.
What kind of plots are you making? What you are asking is supported in Dash Leaflet, but it Dash Leaflet does not have all the plotting capabilities of Plotly figures.
The Dash Leaflet component supports plotting circles (and markers with arbitrary icons), which should suffice to create a scatter plot. However, there is currently no support for density plots, so it might not suit your need after all
@chriddyp, using a store and a client-side callback makes sense. What is not as clear to me is what your target Output would be. Given that you need to access the Graph object’s layout property, don’t you need to specify the Graph object as an output twice? Once with whatever trigger generates the data, and a second time for the mapbox style update which will be handled on the client side. My understanding is that the plotly’s architecture does not allow the same output target multiple times which is why you support the context global to determine the input source? Thanks