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
2016-06-27 07:09:24 +02:00
public Add raster view for raster data 2016-05-04 13:53:47 +02:00
src Rename path static map type to auto 2016-06-27 07:09:24 +02:00
test Minor test update 2016-05-04 13:57:00 +02:00
.dockerignore Add tests to .dockerignore 2016-03-11 11:58:36 +01:00
.gitignore Initial commit 2016-03-02 10:52:02 +01:00
.travis.yml Initial implementation of path rendering 2016-06-24 12:26:26 +02:00
Dockerfile Initial implementation of path rendering 2016-06-24 12:26:26 +02:00
LICENSE.md Create LICENSE.md 2016-06-05 16:44:27 +02:00
package.json Initial implementation of path rendering 2016-06-24 12:26:26 +02:00
README.md Add bearing and pitch to the README.md 2016-06-24 08:57:53 +02:00
run.sh Update run.sh 2016-05-30 22:22:21 +02:00

TileServer GL

Build Status Docker Hub

Installation

Docker

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

Without docker

  • Make sure you have Node v4 or higher (nvm install 4)
  • npm install
  • node src/main.js

Sample data

Sample data can be downloaded at https://github.com/klokantech/tileserver-gl-data/archive/master.zip

Usage

  • unpack somewhere and cd to the directory
  • docker run -it -v $(pwd):/data -p 8080:80 klokantech/tileserver-gl
    • (or node path/to/repo/src/main.js)

Configuration

Create config.json file in the root directory. The config file can contain definition of several paths where the tiles will be served.

Example configuration file

See https://github.com/klokantech/tileserver-gl-data/blob/master/config.json

Note: To specify local mbtiles as source of the vector tiles inside the style, use urls with mbtiles protocol with path relative to the cwd + options.paths.root + options.paths.mbtiles. (For example mbtiles://switzerland.mbtiles)

Available URLs

  • If you visit the server on the configured port (default 8080) you should see your maps appearing in the browser.
  • Style is served at /styles/{id}.json (+ array at /styles.json)
    • Sprites at /styles/{id}/sprite[@2x].{format}
    • Fonts at /fonts/{fontstack}/{start}-{end}.pbf
  • Rendered tiles are at /styles/{id}/rendered/{z}/{x}/{y}[@2x].{format}
    • The optional @2x (or @3x) part can be used to render HiDPI (retina) tiles
    • Available formats: png, jpg (jpeg), webp
    • TileJSON at /styles/{id}/rendered.json
  • Static images are rendered at:
    • /styles/{id}/static/{lon},{lat},{zoom}[,{bearing},{pitch}]/{width}x{height}[@2x].{format} (center-based)
    • /styles/{id}/static/{minx},{miny},{maxx},{maxy}/{zoom}[@2x].{format} (area-based)
  • Source data at /data/{mbtiles}/{z}/{x}/{y}.{format}
    • TileJSON at /data/{mbtiles}.json
  • Array of all TileJSONs at /index.json (/rendered.json; /data.json)