kartotherian/tilelive-http

Name: tilelive-http

Owner: kartotherian

Description: An HTTP source for tilelive

Created: 2016-11-01 04:47:36.0

Updated: 2016-11-01 04:47:37.0

Pushed: 2017-03-25 23:25:36.0

Homepage: null

Size: 43

Language: JavaScript

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

tilelive-http

I am an HTTP source for tilelive.

Usage
tilelive = require("tilelive");
ire("tilelive-http")(tilelive);
ire("mbtiles").registerProtocols(tilelive);

template = "http://tile.stamen.com/watercolor/{z}/{x}/{y}.jpg";

scheme = tilelive.Scheme.create("scanline", {
nzoom: 10,
xzoom: 11,
ox: [-118.9448, 32.8007, -117.6462, 34.8233]


copyTask = new tilelive.CopyTask(template, "mbtiles://./watercolor-la.mbtiles", scheme);
Task.formats = ["tile"];

Task.start(function(err) {
 (err) {
throw err;



Task.on("progress", console.log);
Task.on("finished", function() {
nsole.log("Done!");

Environment Variables
Gotchas

Vector tiles are gzipped at rest. They are served with Content-Encoding: gzip for transport, but by default tilelive-http does not automatically decompress them. See mojodna/tilelive-http#13 and mapbox/vector-tile-spec#27 (comment) for more details.


This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.