- a build / run environment atop OpenMapTiles https://github.com/openmaptiles/openmaptiles
- it includes scripts to build tiles (mbtile file) from OSM data
- it also includes scripts to run a GL server based off a built .mbtiles file
- there are also a set of gl styles that GL can consume
- finally, there scripts to manage (nuke) docker, etc...
- cd ~/omt_server/
- scripts/git_update.sh
- cp <your_OSM_data>.osm.pbf openmaptiles/data/
- scripts/import.sh
- openmaptiles/data/*.mbtiles file is generated(as well as some meta data files) NOTE: import.sh is configured to generate 16 layers of data, which takes ~2 hours for a sub-state region (NW Oregon, SW Washington) larger regions should probably ramp down the layers parameter. See scripts/yml_updates.sh
- cd ~/omt_server/gl
- ls ./data -> borders or-wa.dc-config.yml or-wa.mbtiles
- tmux new-session -d -s my_session 'run.sh >> out.txt 2>&1'
- http://localhost:8080
- mapnik
- Might have to understand underlying data: https://openmaptiles.org/schema/#poi
- Finally, the editor might muck with the data and font URLs. So good to have an script to fix that... "glyphs": "http://localhost:8080/fonts/{fontstack}/{range}.pbf", "glyphs": "{fontstack}/{range}.pbf", "url": "http://localhost:8080/data/or-wa.json" "url": "mbtiles://or-wa.mbtiles"
- https://github.com/mapbox/mapbox-gl-js/tree/main/src/style-spec
- npm install @mapbox/mapbox-gl-style-spec --global # caution global
- gl-style-validate gl/style/trimet.json
- download the font file (e.g., https://fonts.google.com/specimen/Source+Sans+Pro#standard-styles)
- run the font converter:
- git clone https://github.com/openmaptiles/fonts.git
- cd ./fonts
- cp .
- yarn install
- node ./generate.js
- cp ./_output/* ../omt_tiles/gl/fonts/
- https://tileserver.readthedocs.io/en/latest/endpoints.html
- static images:
- /styles/{id}/static/{lon},{lat},{zoom}[@{bearing}[,{pitch}]]/{width}x{height}[@2x].{format}
- https://tiles-dv.trimet.org/styles/bright/static/-122.67567,45.42061,18/300x288.png
- https://tiles-dv.trimet.org/styles/bright/static/-122.67567,45.42061,17@0,70/550x388.png