# tilelive-http

> HTTP source for tilelive

Latest version **0.14.0** (published 2017-11-25) · MIT license · 0 weekly downloads

## Install

```sh
npm install tilelive-http
pnpm add tilelive-http
yarn add tilelive-http
bun add tilelive-http
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.14.0 |
| Published | 2017-11-25 |
| First published | 2013-12-19 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 5 |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 12 |
| Author | Seth Fitzsimmons |
| Maintainers | mojodna |

## Links

- npm: https://www.npmjs.com/package/tilelive-http
- Repository: https://github.com/mojodna/tilelive-http
- Issues: https://github.com/mojodna/tilelive-http/issues
- npm.io page: https://npm.io/package/tilelive-http

## Dependencies (5)

- [debug](https://npm.io/package/debug.md) ^2.2.0
- [retry](https://npm.io/package/retry.md) ^0.10.1
- [semver](https://npm.io/package/semver.md) ^5.2.0
- [request](https://npm.io/package/request.md) ^2.34.0
- [@mapbox/sphericalmercator](https://npm.io/package/@mapbox/sphericalmercator.md) ^1.0.5

## Recent versions

- 0.14.0 (latest) — 2017-11-25
- 0.13.0 — 2017-09-29
- 0.12.2 — 2017-06-14
- 0.12.1 — 2017-06-14
- 0.12.0 — 2017-06-14
- 0.11.3 — 2016-07-24
- 0.11.2 — 2016-07-14
- 0.11.1 — 2016-07-10
- 0.11.0 — 2016-07-10
- 0.10.1 — 2016-07-06
- 0.10.0 — 2016-02-23
- 0.9.0 — 2016-01-08
- 0.8.0 — 2015-07-06
- 0.7.0 — 2015-05-10
- 0.6.1 — 2015-04-30
- … 10 more at https://npm.io/package/tilelive-http/versions

## README

# tilelive-http

I am an HTTP source for [tilelive](https://github.com/mapbox/tilelive.js).

## Usage

```javascript
var tilelive = require("@mapbox/tilelive");
require("tilelive-http")(tilelive);
require("@mapbox/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](https://github.com/mojodna/tilelive-http/pull/13) and [mapbox/vector-tile-spec#27 (comment)](https://github.com/mapbox/vector-tile-spec/issues/27#issuecomment-66670565) for more details.

---
_Source: https://npm.io/package/tilelive-http · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
