d68ab38442
* test: using 512px rendered tiles Based on https://github.com/maptiler/tileserver-gl/pull/495 Signed-off-by: Andrew Calcutt <acalcutt@techidiots.net> * fix: use static renderer at zoom 0 renderer is not able to change the size of tile to more than 512px in tile mode Signed-off-by: Andrew Calcutt <acalcutt@techidiots.net> * Add support for 512 sized raster tiles (#1) * Enable setting tilesize for raster tiles * Serve correct endpoint for raster tiles * Add 256 & 512 sized raster layers to wmts getCapabilities document * Update wmts getCapabilities tileMatrixSets * Add rendered tiles format for getTileUrls method * Update endpoints documentation * Add and fix tiles_rendered tests * fix: formatting Signed-off-by: Andrew Calcutt <acalcutt@techidiots.net> * fix: corrent bad merge Signed-off-by: Andrew Calcutt <acalcutt@techidiots.net> * fix: if tile size is undefined don't add it needed for data endpoint right now Signed-off-by: Andrew Calcutt <acalcutt@techidiots.net> * fix: set tile size in raster endpoints to 512 Signed-off-by: Andrew Calcutt <acalcutt@techidiots.net> * fix: add semicolon Signed-off-by: Andrew Calcutt <acalcutt@techidiots.net> * fix: lint Signed-off-by: Andrew Calcutt <acalcutt@techidiots.net> * fix: test z1 512px file that actually exists Signed-off-by: Andrew Calcutt <acalcutt@techidiots.net> * fix: make tileSize optional Signed-off-by: Andrew Calcutt <acalcutt@techidiots.net> * fix: cleaner if statement Signed-off-by: Andrew Calcutt <acalcutt@techidiots.net> * docs: update tileSize to show as optional Signed-off-by: Andrew Calcutt <acalcutt@techidiots.net> * fix: allow tile size in data url Signed-off-by: Andrew Calcutt <acalcutt@techidiots.net> * fix: remove unneeded tileSize Signed-off-by: Andrew Calcutt <acalcutt@techidiots.net> * fix: set data as 256 tileSize for consistency Signed-off-by: Andrew Calcutt <acalcutt@techidiots.net> * docs: add note about optional data tileSize Signed-off-by: Andrew Calcutt <acalcutt@techidiots.net> * fix: lint Signed-off-by: Andrew Calcutt <acalcutt@techidiots.net> * Revert "fix: remove unneeded tileSize" This reverts commit a4583161bf53653d65a4606c407ba9b5249d1061. * fix: allow tile size to be set at json endpoints Signed-off-by: Andrew Calcutt <acalcutt@techidiots.net> * fix: set default endpoint tilesizes Signed-off-by: Andrew Calcutt <acalcutt@techidiots.net> * fix: don't use tilesize one data endpoint It doesn't do anything Signed-off-by: Andrew Calcutt <acalcutt@techidiots.net> * fix: default style endpoint to undefined Signed-off-by: Andrew Calcutt <acalcutt@techidiots.net> * fix: zoom 0 workaround Signed-off-by: Andrew Calcutt <acalcutt@techidiots.net> * Revert "fix: zoom 0 workaround" This reverts commit 0f3bbd765c9c151016cec66768675f990676c8b3. * fix: limit min zoom to 1 in viewer Signed-off-by: Andrew Calcutt <acalcutt@techidiots.net> * fix: put back orig string Signed-off-by: Andrew Calcutt <acalcutt@techidiots.net> * docs: add optional tilesize to TileJSON Signed-off-by: Andrew Calcutt <acalcutt@techidiots.net> * fix: cleanup thumbnails Signed-off-by: Andrew Calcutt <acalcutt@techidiots.net> * fix: default undefined like other data endpoints Signed-off-by: Andrew Calcutt <acalcutt@techidiots.net> * fix: move data xyz_link Signed-off-by: Andrew Calcutt <acalcutt@techidiots.net> * fix: remove console.log Signed-off-by: Andrew Calcutt <acalcutt@techidiots.net> * fix: lint Signed-off-by: Andrew Calcutt <acalcutt@techidiots.net> * chore: update version Signed-off-by: Andrew Calcutt <acalcutt@techidiots.net> * fix: update path Signed-off-by: Andrew Calcutt <acalcutt@techidiots.net> * fix: join error Signed-off-by: Andrew Calcutt <acalcutt@techidiots.net> * fix: revert path change Signed-off-by: Andrew Calcutt <acalcutt@techidiots.net> --------- Signed-off-by: Andrew Calcutt <acalcutt@techidiots.net> Co-authored-by: Petteri Pesonen <teemu.p.pesonen@gmail.com> |
||
---|---|---|
.github | ||
.husky | ||
docs | ||
public | ||
src | ||
test | ||
.dockerignore | ||
.eslintignore | ||
.eslintrc.cjs | ||
.gitattributes | ||
.gitignore | ||
.hadolint.yml | ||
.nvmrc | ||
.prettierignore | ||
.readthedocs.yaml | ||
commitlint.config.cjs | ||
docker-entrypoint_light.sh | ||
docker-entrypoint.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_light.md | ||
README.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://maptiler-tileserver.readthedocs.io/.
Alternative
Discover MapTiler Server if you need a map server with easy setup and user-friendly interface.