Using State of Map (Mapbox) on Callbacks

I am currently using Scattermapbox to render my map.
I would like to add layers to my map on clicks to checklist.
However, I have a problem that when I add a callback and return a new figure on click, the map is recentered and re-zoomed.

  • Is there some way I can change the visibility of layer directly in a callback, so that I don’t have to return a new figure and hence this problem does not happen?
  • If the above is not possible, then how can I use the state of my current zoom, center to keep this info on showing / turning-off layers?

cc: @chriddyp