I am rendering choropleth plots with scattermapbox with quite a high resolution. Obviously, this high resolution is needed only at large zooms. Yet at smaller zooms, despite not benefiting from the resolution, the plot remains quite slow.
Is there any optimisation possible?
I am thinking of three solutions which all are not practical:
- obtain the bounding box of the map (I couldn’t find any way to get them, I think this is not possible) and only plot whatever is inside the bounding box
- re-mesh the layers accordingly to the zoom to have less element to plot: this will prohibit reaching larger zoom if 1) cannot be done.
- transform the grid into a heatmap, prohibiting the user to understand the limitation of the model by not showing the grid.
Is there any other way to do it?