tile-cover-boxes
v2.0.1
Published
Generate slippy tiles to cover plumped polyline.
Downloads
6
Readme
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