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.
Go to file
Andrew Calcutt b2bd5eaa96
Convert to esm module syntax (#606)
* switch to esm module

* Update package.json

* change to maplibre package

* fix tests

* eslint

* remove extra package updates

* Delete package-lock.json

* change 'fs' to 'node:fs'

* put back node 10.

without the package updates this still works

* remove trailing commas

* remove unassociated fix / formatting

* remove unassociated fix

* remove eslint from this PR

* remove unassociated fix

* lint

* Merge remote-tracking branch 'upstream/master' into esm_update

* fix mlgl

* update maplibre-native to new version with arm64

* update minor version
2022-09-28 14:41:55 -04:00
docs update spelling (#594) 2022-09-22 21:50:10 -04:00
public CSS: Fix line break for long key-value strings (#580) 2022-09-24 00:46:17 -04:00
src Convert to esm module syntax (#606) 2022-09-28 14:41:55 -04:00
test Convert to esm module syntax (#606) 2022-09-28 14:41:55 -04:00
.dockerignore Use simplified entrypoint script 2020-12-04 16:19:30 +01:00
.gitignore Experimental integration of first plugin 2016-12-06 20:11:18 +01:00
.travis.yml Update travis to node 10 2019-12-30 16:54:36 +01:00
docker-entrypoint_light.sh update docker images to work with new maplibre-native 2022-09-14 17:43:44 -04:00
docker-entrypoint.sh specify port 80 to match instructions 2022-09-15 15:48:50 -04:00
Dockerfile remove CMD that doesn't work 2022-09-16 00:27:50 -04:00
Dockerfile_light update docker images to work with new maplibre-native 2022-09-14 17:43:44 -04:00
Dockerfile_test update docker images to work with new maplibre-native 2022-09-14 17:43:44 -04:00
ISSUE_TEMPLATE.md Update ISSUE_TEMPLATE.md 2018-01-23 12:17:14 +01:00
LICENSE.md Create LICENSE.md 2016-06-05 16:44:27 +02:00
package.json Convert to esm module syntax (#606) 2022-09-28 14:41:55 -04:00
publish.js Convert to esm module syntax (#606) 2022-09-28 14:41:55 -04:00
PUBLISHING.md Add PUBLISHING.md 2016-08-24 14:20:16 +02:00
README_light.md Replace last references to the old repository/dockerhub 2020-03-11 13:57:45 +01:00
README.md Readme update (#611) 2022-09-21 23:03:22 -04:00
run.sh Resolve https://github.com/maptiler/tileserver-gl/issues/386 2020-01-28 11:29:42 +02:00

tileserver-gl

TileServer GL

Build Status Docker Hub

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 14.20.0 or above installed. Node 16 is recommended. (running node -v it should output something like v16.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 --mbtiles 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:80 maptiler/tileserver-gl --mbtiles 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:80 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:80 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/.

Alternative

Discover MapTiler Server if you need a map server with easy setup and user-friendly interface.