Sorry for the late answer, I managed to do it, but with vector tiles, not raster tiles.
Apparently raster tiles support is ongoing but currently not supported by Dash.
If you’re interested in the vector tiles for an offline mode, here is how I managed to make it work :
- Have a tile server running, I used this docker image with OpenStreetMap mbtiles :
Docker image : https://hub.docker.com/r/klokantech/tileserver-gl/
OpenStreetMap Mbtiles files can easily be found on the web.
- As of Dash : In the layout of the Mapbox map :
- Provide a dummy mapbox key (You don’t need an actual Mapbox key as you’re using your own tileserver, however, the mapbox key cannot be an empty string (I don’t know why though …)
- Finally, set the ‘style’ property of the layout to the GL style json URL.
If you use Klokantech docker image : you can click on the GL Style button (see screenshot : https://openmaptiles.org/media/tileserver_gl_styles.png) and copy paste the link to the json file.
After those 3 steps, it should work like a charm!