@kartotherian/tilelive-http
HTTP source for tilelive - with Kartotherian header compression customizations
Last updated 3 years ago by nyurik .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install @kartotherian/tilelive-http 
SYNC missed versions from official npm registry.

tilelive-http

I am an HTTP source for tilelive.

Usage

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

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

var scheme = tilelive.Scheme.create("scanline", {
  minzoom: 10,
  maxzoom: 11,
  bbox: [-118.9448, 32.8007, -117.6462, 34.8233]
});

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

copyTask.start(function(err) {
  if (err) {
    throw err;
  }
});

copyTask.on("progress", console.log);
copyTask.on("finished", function() {
  console.log("Done!");
});

Environment Variables

  • TILELIVE_USER_AGENT - User-Agent header when making upstream requests

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.

Current Tags

  • 0.12.1                                ...           latest (3 years ago)

1 Versions

  • 0.12.1                                ...           3 years ago
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 1
Last Month 1
Dependencies (5)
Dev Dependencies (0)
None
Dependents (1)

Copyright 2014 - 2016 © taobao.org |