I followed the answer here to combine different plots into one:
This seems to work great, but the problem Iβm having is that when I use this method the figure always start zoomed all the way out (So I can see the entire world) and thus I have to center the map on the area I want and zoom all the way in, which takes a long time whenever I want to see my data.
I have tried to use both map_center and map_zoom in the fig.update_layout() and I have added overwrite=True, just in case they were somehow set previously, but none of it seems to make any difference.
I have also tried to add zoom levels and center to each figure, but that also does not seem to matter.
So now Iβm all out of ideas and not really sure what is going on here.
Does anyone have any suggestions?
Current code (with just one plot in it, since it fails already for one):
fig = go.Figure()
map_scatter = px.scatter_mapbox(df_sensors,
lat='lat',
lon='lon',
color_discrete_sequence=['red'],
zoom=12)
fig.add_traces(map_scatter.data)
fig.update_layout(mapbox_style="open-street-map",
overwrite=True,
map_center={'lat': 56.176, 'lon': 9.554},
map_zoom=12)
fig.show()