tile-cover-boxes

2.0.1 • Public • Published

NPM version Build Status Dependency Status

tile-cover-boxes

Generate slippy tiles to cover plumped polyline.

Install

$ npm install --save tile-cover-boxes

Usage

Can be used to find a minimal set of covering tiles for set of bounding boxes, but the typical usage involves plumping a polyline and then finding finding tiles that would cover the area around it.

var plumper = require('plumper');

// polyline is a set of points
var polyline = [[0,2], [3,4], [7,8]];
// boxes is an array of rectangles [sw, ne]
var boxes = plumper(polyline, 5); // add some "fat" to polyline

var tileCoverBoxes = require('tile-cover-boxes');

// calculate the tiles that cover the polyline and "fat"
var tiles = tileCoverBoxes(boxes);

License

MIT © Damian Krzeminski

Dependencies (0)

    Dev Dependencies (2)

    Package Sidebar

    Install

    npm i tile-cover-boxes

    Weekly Downloads

    2

    Version

    2.0.1

    License

    MIT

    Unpacked Size

    4.12 kB

    Total Files

    6

    Last publish

    Collaborators

    • pirxpilot