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.
Find a file
Damian Krzeminski 6c23d95feb add --cors option to allow for optional CORS handling
we are using `cors` middleware with default options which works for most
applications, but does not allow for fine tuning (whitelisting origins
etc.)

this change keeps CORS handling as default to preserve compatibility but
also allows for specying `--no-cors` option which makes it possible to
handle CORS in an independent proxy (NGINX, another node app etc.)
2017-04-12 09:43:43 -07:00
docs Word correction (Forwaded -> Forwarded) 2017-03-30 20:16:03 +07:00
public Hide empty headers on index (close #125) 2017-03-14 16:02:54 +01:00
src add --cors option to allow for optional CORS handling 2017-04-12 09:43:43 -07:00
test Configurable scale factors (close #121) 2017-03-15 12:09:18 +01:00
.dockerignore Slightly stricter .dockerignore 2017-01-13 11:03:12 +01:00
.gitignore Experimental integration of first plugin 2016-12-06 20:11:18 +01:00
.travis.yml Update tests and links to use the new data 2016-12-15 10:51:18 +01:00
Dockerfile Slight docker performance optimization 2017-04-04 18:46:18 +02:00
Dockerfile_light Slight docker performance optimization 2017-04-04 18:46:18 +02:00
LICENSE.md Create LICENSE.md 2016-06-05 16:44:27 +02:00
package.json Update package version to 1.5.0 2017-03-29 15:46:30 +02:00
publish.js Remove native dependency from tileserver-gl-light (close #113) 2017-02-03 09:42:31 +01:00
PUBLISHING.md Add PUBLISHING.md 2016-08-24 14:20:16 +02:00
README.md Update README.md 2017-01-19 09:24:26 +01:00
README_light.md Update READMEs and descriptions 2016-08-25 12:52:32 +02:00
run.sh Allow options to be passed to the docker + document it (close #87) 2016-12-21 07:01:16 +01:00

tileserver-gl

TileServer GL

Build Status Docker Hub

Vector and raster maps with GL styles. Server side rendering by Mapbox GL Native. Map tile server for Mapbox GL JS, Android, iOS, Leaflet, OpenLayers, GIS via WMTS, etc.

Get Started

Install tileserver-gl with server-side raster rendering of vector tiles with npm

npm install -g tileserver-gl

Now download vector tiles from OpenMapTiles.

curl -o zurich_switzerland.mbtiles https://openmaptiles.os.zhdk.cloud.switch.ch/v3.3/extracts/zurich_switzerland.mbtiles

Start tileserver-gl with the downloaded vector tiles.

tileserver-gl zurich_switzerland.mbtiles

Alternatively, you can use the tileserver-gl-light 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 MapBox GL Native.

Using Docker

An alternative to npm to start the packed software easier is to install Docker on your computer and then run in the directory with the downloaded MBTiles the command:

docker run -it -v $(pwd):/data -p 8080:80 klokantech/tileserver-gl

This will download and start a ready to use container on your computer and the maps are going to be available in webbrowser on localhost:8080.

On laptop you can use Docker Kitematic and search "tileserver-gl" and run it, then drop in the 'data' folder the MBTiles.

Documentation

You can read full documentation of this project at http://tileserver.readthedocs.io/.