tile-cover-boxes

Generate slippy tiles to cover plumped polyline.


Keywords
tile, cover, boxes, polyline, map, tiles
License
MIT
Install
npm install tile-cover-boxes@1.0.0

Documentation

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