Makefile
変数の定義いろいろ
git clone git@github.com:systemed/tilemaker.gitcd tilemakertilemaker --input tmp/region.pbf --output tmp/region.mbtilesmake clean # dont forget clean if you have tried to make tilemaker on host machine!docker build . -t tilemakerdocker run --rm --mount type=bind,source=$(CURDIR)/tmp,target=/tmp tilemaker --input /tmp/region.pbf --output /tmp/region.mbtilesgit clone git@github.com:mapbox/tippecanoe.gitcd tippecanotetile-join --force --no-tile-compression --no-tile-size-limit --no-tile-stats --output-to-directory=docs/zxy path/to/region.mbtilesmake cleandocker build -t tippecanoe .docker run -it --rm --mount type=bind,source=$(CURDIR)/tmp,target=/tmp tippecanoe tile-join --force --no-tile-compression --no-tile-sizelimit --no-tile-stats --output-to-directory /tmp/zxy /tmp/region.mbtilescp -r tmp/zxy docs/ docs/zxy/{z}/{x}/{y}/*.pbf docs directory has special meanings on GitHub Pages section of your GitHub repository to publish docs directorynpm i -g mbtiles2tilejsonmbtiles2tilejson tmp/region.mbtiles --url https://your-github-username.github.io/your-repo-name/zxy/ > docs/tiles.json osm-bright-gl-style based style.json that has fixed glyphs issue<html lang="ja"> <head> <meta charset="UTF-8" /> <meta http-equiv="X-UA-Compatible" content="IE=edge" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" /> <title>Vector tile builder Demo</title> <script src="https://unpkg.com/maplibre-gl@1.15.2/dist/maplibre-gl.js"></script> <link href="https://unpkg.com/maplibre-gl@1.15.2/dist/maplibre-gl.css" rel="stylesheet" /> <style> html, body, #map { width: 100vw; height: 100vh; padding: 0; margin: 0; } </style> </head> <body> <div id="map"></div> <script> (async () => { let map; const res = await fetch("./tiles.json"); const tilejson = await res.json(); const bounds = tilejson.bounds; const center = tilejson.center ? tilejson.center : [(bounds[0] + bounds[2]) / 2, (bounds[1] + bounds[3]) / 2]; const zoom = (tilejson.minzoom + tilejson.maxzoom) / 2; console.log(center, zoom); map = new maplibregl.Map({ container: "map", style: "./style.json", center: center, zoom: 5, }); map.addControl(new maplibregl.NavigationControl()); map.addControl( new maplibregl.AttributionControl({ compact: false, customAttribution: "Style © <a href='http://openmaptiles.org/'>OpenMapTiles</a> | " + "Data © <a href='http://www.openstreetmap.org/copyright'>OpenStreetMap contributors</a>", }) ); })(); </script> </body></html>