![]() * first attempt to upgrade express to v5 Co-Authored-By: Andrew Calcutt <acalcutt@techidiots.net> * try to fix https://github.com/maptiler/tileserver-gl/issues/1411 Co-Authored-By: Andrew Calcutt <acalcutt@techidiots.net> * cleanup server.js Co-Authored-By: Andrew Calcutt <acalcutt@techidiots.net> * cleanup serve_font.js Co-Authored-By: Andrew Calcutt <acalcutt@techidiots.net> * cleanup sever_rendered.js Co-Authored-By: Andrew Calcutt <acalcutt@techidiots.net> * cleanup server_data.js Co-Authored-By: Andrew Calcutt <acalcutt@techidiots.net> * cleanup serve_style Co-Authored-By: Andrew Calcutt <acalcutt@techidiots.net> * Update serve_style.js Co-Authored-By: Andrew Calcutt <acalcutt@techidiots.net> * Move UV_THREADPOOL_SIZE to main thred Co-Authored-By: Andrew Calcutt <acalcutt@techidiots.net> * cleanup utils.js Co-Authored-By: Andrew Calcutt <acalcutt@techidiots.net> * Use common app.get for images and static images Co-Authored-By: Andrew Calcutt <acalcutt@techidiots.net> * add allowedTileSizes and option Co-Authored-By: Andrew Calcutt <acalcutt@techidiots.net> * cleanup error responses Co-Authored-By: Andrew Calcutt <acalcutt@techidiots.net> * fix /style/id.json with next('route') Co-Authored-By: Andrew Calcutt <acalcutt@techidiots.net> * improve sprite path Co-Authored-By: Andrew Calcutt <acalcutt@techidiots.net> * add parseFloadts around zxy Co-Authored-By: Andrew Calcutt <acalcutt@techidiots.net> * simplify server_data Co-Authored-By: Andrew Calcutt <acalcutt@techidiots.net> * move tile fetch and add fix verbose logging Co-Authored-By: Andrew Calcutt <acalcutt@techidiots.net> * add Handling request to verbose logging Co-Authored-By: Andrew Calcutt <acalcutt@techidiots.net> * first attempt to upgrade express to v5 Co-Authored-By: Andrew Calcutt <acalcutt@techidiots.net> * try to fix https://github.com/maptiler/tileserver-gl/issues/1411 Co-Authored-By: Andrew Calcutt <acalcutt@techidiots.net> * cleanup server.js Co-Authored-By: Andrew Calcutt <acalcutt@techidiots.net> * cleanup serve_font.js Co-Authored-By: Andrew Calcutt <acalcutt@techidiots.net> * cleanup sever_rendered.js Co-Authored-By: Andrew Calcutt <acalcutt@techidiots.net> * cleanup server_data.js Co-Authored-By: Andrew Calcutt <acalcutt@techidiots.net> * cleanup serve_style Co-Authored-By: Andrew Calcutt <acalcutt@techidiots.net> * Update serve_style.js Co-Authored-By: Andrew Calcutt <acalcutt@techidiots.net> * Move UV_THREADPOOL_SIZE to main thred Co-Authored-By: Andrew Calcutt <acalcutt@techidiots.net> * cleanup utils.js Co-Authored-By: Andrew Calcutt <acalcutt@techidiots.net> * Use common app.get for images and static images Co-Authored-By: Andrew Calcutt <acalcutt@techidiots.net> * add allowedTileSizes and option Co-Authored-By: Andrew Calcutt <acalcutt@techidiots.net> * cleanup error responses Co-Authored-By: Andrew Calcutt <acalcutt@techidiots.net> * fix /style/id.json with next('route') Co-Authored-By: Andrew Calcutt <acalcutt@techidiots.net> * improve sprite path Co-Authored-By: Andrew Calcutt <acalcutt@techidiots.net> * add parseFloadts around zxy Co-Authored-By: Andrew Calcutt <acalcutt@techidiots.net> * simplify server_data Co-Authored-By: Andrew Calcutt <acalcutt@techidiots.net> * move tile fetch and add fix verbose logging Co-Authored-By: Andrew Calcutt <acalcutt@techidiots.net> * add Handling request to verbose logging Co-Authored-By: Andrew Calcutt <acalcutt@techidiots.net> * merge elevation changes * lint format * add verbose logging, improve headers * try to fix codeql Information exposure through a stack trace * test * all tests passing * cleanup unneeded changes * cleanup * try to fix codeql error * font fixes * fix tile size issue * try to improve scale + codeql * codeql for sprite logging * codeql serve fonts * codeql fixes * fix failing test with multiple fonts * Update serve_font.js * codeql * codeql * codeql * Update utils.js * codeql * codeql * codeql * codeql * codeql sanitize * Update serve_font.js * Update serve_font.js * remove useless assignment * move isGzipped * add if-modified-since and cache-control * use consistent cache control * reformat * codeql * codeql * codeql * codeql * codeql * codeql * codeql * Update serve_font.js * Update serve_font.js * Update serve_font.js * Update serve_style.js * Update serve_style.js * Update serve_style.js * Revert "Update serve_style.js" This reverts commit |
||
---|---|---|
.github | ||
docs | ||
public | ||
src | ||
test | ||
.dockerignore | ||
.eslintignore | ||
.eslintrc.cjs | ||
.gitattributes | ||
.gitignore | ||
.hadolint.yml | ||
.nvmrc | ||
.prettierignore | ||
.readthedocs.yaml | ||
CHANGELOG.md | ||
commitlint.config.cjs | ||
docker-entrypoint.sh | ||
docker-entrypoint_light.sh | ||
Dockerfile | ||
Dockerfile_light | ||
Dockerfile_test | ||
ISSUE_TEMPLATE.md | ||
LICENSE.md | ||
lint-staged.config.cjs | ||
package-lock.json | ||
package.json | ||
prettier.config.cjs | ||
publish.js | ||
PUBLISHING.md | ||
README.md | ||
README_light.md |
TileServer GL
Vector and raster maps with GL styles. Server-side rendering by MapLibre GL Native. Map tile server for MapLibre GL JS, Android, iOS, Leaflet, OpenLayers, GIS via WMTS, etc.
Download vector tiles from OpenMapTiles.
Getting Started with Node
Make sure you have Node.js version 18.17.0 or above installed. Node 20 is recommended. (running node -v
it should output something like v20.x.x
). Running without docker requires Native dependencies to be installed first.
Install tileserver-gl
with server-side raster rendering of vector tiles with npm.
npm install -g tileserver-gl
Once installed, you can use it like the following examples.
using a mbtiles file
wget https://github.com/maptiler/tileserver-gl/releases/download/v1.3.0/zurich_switzerland.mbtiles
tileserver-gl --file zurich_switzerland.mbtiles
[in your browser, visit http://[server ip]:8080]
using a config.json + style + mbtiles file
wget https://github.com/maptiler/tileserver-gl/releases/download/v1.3.0/test_data.zip
unzip test_data.zip
tileserver-gl
[in your browser, visit http://[server ip]:8080]
Alternatively, you can use the tileserver-gl-light
npm package instead, which is pure javascript, does not have any native dependencies, and can run anywhere, but does not contain rasterization on the server side made with Maplibre GL Native.
Getting Started with Docker
An alternative to npm to start the packed software easier is to install Docker on your computer and then run from the tileserver-gl directory
Example using a mbtiles file
wget https://github.com/maptiler/tileserver-gl/releases/download/v1.3.0/zurich_switzerland.mbtiles
docker run --rm -it -v $(pwd):/data -p 8080:8080 maptiler/tileserver-gl --file zurich_switzerland.mbtiles
[in your browser, visit http://[server ip]:8080]
Example using a config.json + style + mbtiles file
wget https://github.com/maptiler/tileserver-gl/releases/download/v1.3.0/test_data.zip
unzip test_data.zip
docker run --rm -it -v $(pwd):/data -p 8080:8080 maptiler/tileserver-gl
[in your browser, visit http://[server ip]:8080]
Example using a different path
docker run --rm -it -v /your/local/config/path:/data -p 8080:8080 maptiler/tileserver-gl
replace '/your/local/config/path' with the path to your config file
Alternatively, you can use the maptiler/tileserver-gl-light
docker image instead, which is pure javascript, does not have any native dependencies, and can run anywhere, but does not contain rasterization on the server side made with Maplibre GL Native.
Getting Started with Linux cli
Test from command line
wget https://github.com/maptiler/tileserver-gl/releases/download/v1.3.0/test_data.zip
unzip -q test_data.zip -d test_data
xvfb-run --server-args="-screen 0 1024x768x24" npm test
Run from command line
xvfb-run --server-args="-screen 0 1024x768x24" node .
Documentation
You can read the full documentation of this project at https://tileserver.readthedocs.io/en/latest/.
Alternative
Discover MapTiler Server if you need a map server with easy setup and user-friendly interface.