Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

tilelive

Package Overview
Dependencies
Maintainers
0
Versions
72
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

tilelive

Map server with backends for mapnik and mbtiles

  • 3.0.1
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
82
increased by290.48%
Maintainers
0
Weekly downloads
 
Created
Source

tilelive.js

tilelive.js is a tile server for node.js which supports on-the-fly configuration and advanced interaction output. It can be used to add a tile server to an existing web application or wrapped with a light standalone web tile server.

Backends

tilelive.js supports backends for serving tiles and for storing them when creating mbtiles or other caches of tiles.

Each backend is expected to export an object in the following form:

module.exports = {
    // Return an object usable with the `Pool()` constructor from
    // `generic-pool`. The resource will be pooled and passed back to
    // other backend methods for serving and storing.
    pool: function(datasource) {
        return {
            create: [Function],
            destroy: [Function]
        }
    },

    // For server backends.
    // Serve a tile, grid, or other resource. The `callback` function
    // should be called with `callback(err, data)` where `data` is an array
    // such that `data[0]` is suitable as a response body and `data[1]`
    // contains a hash of HTTP headers that describe the data.
    serve: function(resource, options, callback) {},

    // For storage backends.
    // Store tiles, grids, or perform other tasks related to batch tile
    // generation. Steps called include: setup, metadata, tiles, grids,
    // and finish.
    setup: function(step, resource, data, callback) {}
}

To use tilelive to serve tiles from mbtiles install mbtiles. To serve dynamically rendered tiles using mapnik install tilelive-mapnik. To render tiles using mapnik and store them in the mbtiles format, install both.

Install

Install master:

git clone git://github.com/mapbox/tilelive.js.git tilelive
cd tilelive
npm install .

Or install latest release via npm repositories:

npm install tilelive

tilebatch

tilelive can be used to create mbtiles files or possibly other formats using the tilebatch command.

tilebatch <datasource> <filepath>

For a full list of options, run tilebatch --help.

Tests

To run the tests

npm test

Usage

See examples or geode for examples of a tilelive powered server.

Changelog

3.0.0

Split out tilelive-mapnik, mbtiles backends.

2.0.3

This release is all distribution fixes:

  • Uses devDependencies to support docs and testing
  • Fixes test that depended on node-get
  • Removes tilelive_server example: replaced by geode.

2.0.2

  • Now uses and requires node-mapnik 0.3.0

2.0.1

Minor release: adds Pool argument to Tile.getMap(), to let users dispose of used maps.

2.0.0

  • node-sqlite3 replaces node-sqlite for better performance and stability.
  • deep render grid support - layer.json now supports legends and interaction.
  • server.js removed from examples
  • tilelive_server.js added to bin/

1.1.0

  • Tiles no longer accept tile as a scheme. TMS or XYZ are required; TMS is default.
  • options.mapfile is now options.datasource, and can accept a Carto MML object.

Keywords

FAQs

Package last updated on 20 May 2011

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc