Artsdatabanken / tiny-tileserver

A minimal http server with mbtiles (SQLite) raster and vector tiles support.

Home Page:https://data.artsdatabanken.no/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

tiny-tileserver

Build Status Coverage Status Open Source Love MIT Licence PRs Welcome code style: prettier

Screenshot

Demo: tiny-tileserver

tiny-tileserver is a minimal raster and vector tile server. It supports .mbtiles containing rasters of .png, .jpg and vector tiles in .pbf protobuf format.

Features

  • Supports thousands of tile sets
  • Vector tiles (MBTiles)
    • Serve protobuf .pbf vector tiles
    • Compressed (deflate, gzip) or uncompressed tiles
    • Can convert to .geosjon
    • Return semi-raw protobuf as json (integer coordinates)
  • Raster tiles (MBTiles)
    • Serve png or jpg raster tiles
  • Static files
    • Can serve any other file statically

Installation

Put one or more .mbtiles inside the data subfolder.

Execute:

yarn
yarn start

Navigate to http://localhost:8000/ to display a summary of the tile sets.

Tiles can be pulled using an url of this form: http://localhost:8000/{name}/{zoom}/{x}/{y}

Configuration

Tiny-tileserver has command-line options:

Usage: node tiny-tileserver.js [options] [rootDirectory]

rootDirectory    Data directory containing .mbtiles

Options:
   -p PORT --port PORT       Set the HTTP port [8000]

A root directory is required.

Images

The following images are built for each tiny-tileserver release, using the Node.js base image.

Docker image

To use prebuilt docker image, navigate to a folder containing .mbtile file(s) and run

docker run -v ${pwd}:/data -p 8000:8000 artsdatabanken/tiny-tileserver

About

A minimal http server with mbtiles (SQLite) raster and vector tiles support.

https://data.artsdatabanken.no/


Languages

Language:JavaScript 92.9%Language:HTML 5.3%Language:Dockerfile 1.3%Language:Shell 0.5%