The offline deployment of Mapbox can be summarized into two aspects: one is the offline publishing of map data; the other is the offline publishing of mapbox-gl.js and text ICONS; The following describes how to deploy MapBox offline from these two aspects.

Map data is published offline

Get map data

indownload.geofabrik.de/asia.htmlOsm open source data can be downloaded. Here, China’s data is taken as an example.

Map data processing

This will be published using MBTiles data, so you need to process.shP data into MBTiles format.This is the decompressed data, which needs to be processed into mbTiles format. Mapbox’s open source processing tool is recommendedtippecanoeYou can process the GeoJSON data into MBTiles.

First, convert the downloaded.shp file to GeoJSON format (QGIS or any other tool will do), then process the data through Tippecanoe, using landuse data as an example.This gives you the MBTiles data you need to publish.

Map data publishing

Publishing mainly uses Express and Node-mbTiles for publishing map data. Refer to MBView

Details on how to take text and ICONS offline will continue later.