You can combine OpenMapTiles with your custom vector data saved in Shapefile or GeoJSON format (there is a separate article for data stored in PostGIS database). The easiest way is to convert your data into vector tiles and then combine it with a standard OpenMapTiles source in a map style. The big advantage of this approach is that you don’t need to generate the whole OpenMapTiles schema which is quite time-consuming.

Preparation

On Linux and macOS, you can use a command-line tool tippecanoe originally from Mapbox. See installation instructions.

Before using tippecanoe, you need to transform your data into the EPSG:4326 coordinate system. You can use for example ogr2ogr utility which is part of gdal:

ogr2ogr -f GeoJSON your_data_in_4326.json -t_srs EPSG:4326 your_data.shp

Generate the Vector Tiles

Having your data in a correct coordinate system, you can do the conversion using tippecanoe. The most simple use case is:

tippecanoe -o tiles.mbtiles your_data_in_4326.json

It will convert your data into MBTiles for zoom levels 0 to 14. Tippecanoe enables much more sophisticated options, including layer and attribute management, dropping features, generalization, and more. See documentation.

You can visually check the generated MBTiles file using TileServer-GL:

make start-tileserver

Data preview with TileServer-GL: Data preview with TileServer-GL

Combine your vector tiles with OpenMapTiles

After creating vector tiles, you can combine them with the standard OpenMapTiles layer in one map style. It can be done in the same way as in case of raster tiles.

User-friendly software

Alternatively, you can use commercial map tiling software with a user-friendly GUI to generate your vector data overlay.

OpenMapTiles.org is an open-source project from OMT community and MapTiler who provides Maps API.
Read the documentation for map developers. Share this page on