https://github.com/urbica/tessella
Lightweight Node.js Mapbox Vector Tiles server
https://github.com/urbica/tessella
docker map mapbox-vector-tiles mbtiles nodejs
Last synced: 6 months ago
JSON representation
Lightweight Node.js Mapbox Vector Tiles server
- Host: GitHub
- URL: https://github.com/urbica/tessella
- Owner: urbica
- License: mit
- Created: 2016-12-04T08:26:51.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2023-01-23T22:23:47.000Z (about 3 years ago)
- Last Synced: 2025-09-02T17:56:28.560Z (6 months ago)
- Topics: docker, map, mapbox-vector-tiles, mbtiles, nodejs
- Language: JavaScript
- Size: 1.28 MB
- Stars: 85
- Watchers: 8
- Forks: 11
- Open Issues: 12
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE.md
Awesome Lists containing this project
- awesome-vector-tiles - tessella - lightweight Node.js Mapbox Vector Tiles server. Inspired by tessera. (Servers)
README
# tessella
[](https://www.npmjs.com/package/tessella)
[](https://www.npmjs.com/package/tessella)
[](https://travis-ci.org/urbica/tessella)

tessella is a lightweight Node.js [Mapbox Vector Tiles](https://github.com/mapbox/vector-tile-spec) server.
Inspired by [tessera](https://github.com/mojodna/tessera).
## Installation
tessella requires node v7.6.0 or higher for ES2015 and async function support.
```shell
npm install tessella -g
npm install -g
```
...or build from source
```shell
git clone https://github.com/urbica/tessella.git
cd tessella
npm i
```
## Usage
```shell
Usage: tessella [options] [URI]
where [uri] is tilelive URI to serve and [options] is any of:
--port - port to run on (default: 4000)
--socket - use Unix socket instead of port
--cacheSize - cache size in MB (default: 10)
--sourceCacheSize - source cache size in # of sources (default: 6)
--version - returns running version then exits
```
### Examples
MBTiles
```shell
npm install -g @mapbox/mbtiles
tessella mbtiles://./whatever.mbtiles
```
PostGIS
```shell
npm install -g tilelive-postgis
tessella postgis://localhost/test?table=tableName&geometry_field=geom
```
## Using with Leaflet
```js
const map = L.map("map").setView([0, 0], 0);
L.tileLayer("http://localhost:4000/{z}/{x}/{y}.png").addTo(map);
```
with retina support:
```js
const map = L.map("map").setView([0, 0], 0);
L.tileLayer("http://localhost:4000/{z}/{x}/{y}{r}.png").addTo(map, {
detectRetina: true
});
```
## Using with Docker
```shell
docker run -d -p 4000:4000
```
Where `URI` is is tilelive URI to serve.