mbtileserv

A Google/XYZ and TMS mbtiles tile server

Usage no npm install needed!

<script type="module">
  import mbtileserv from 'https://cdn.skypack.dev/mbtileserv';
</script>

README

mbtileserv

Google XYZ and TMS enabled mbtiles server.

Uses tilelive.js and node-mbtiles.

Read more about map tiles and tile schemes at Tiles à la Google Maps.

Install

From npm

$ npm install -g mbtileserv

Or from source

$ git clone https://github.com/Eniro/mbtileserv.git
$ cd mbtileserv
$ npm install -g

Run

Start server on port 5000 and load all .mbtiles in the current directory

$ mbtileserv

Start server on port 8080 and load all .mbtiles in the /data directory

$ mbtileserv /data 8080

Use

Run example page (shows all loaded layers)

http://localhost:5000/

Fetch a Google XYZ tile

http://localhost:5000/xyz/plain_1/3/2/2.png

Fetch a TMS tile

http://localhost:5000/tms/plain_1/3/2/5.png