https://github.com/pirxpilot/tile-cover-boxes
Generate slippy tiles to cover plumped polyline.
https://github.com/pirxpilot/tile-cover-boxes
map polyline tiles
Last synced: 5 months ago
JSON representation
Generate slippy tiles to cover plumped polyline.
- Host: GitHub
- URL: https://github.com/pirxpilot/tile-cover-boxes
- Owner: pirxpilot
- Created: 2017-04-18T21:02:50.000Z (about 9 years ago)
- Default Branch: main
- Last Pushed: 2025-01-25T23:11:44.000Z (over 1 year ago)
- Last Synced: 2025-10-12T00:32:42.706Z (9 months ago)
- Topics: map, polyline, tiles
- Language: JavaScript
- Size: 23.4 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: Readme.md
- Changelog: History.md
Awesome Lists containing this project
README
[![NPM version][npm-image]][npm-url]
[![Build Status][build-image]][build-url]
[![Dependency Status][deps-image]][deps-url]
# tile-cover-boxes
Generate slippy tiles to cover plumped polyline.
## Install
```sh
$ 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.
```js
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](https://furkot.com)
[npm-image]: https://img.shields.io/npm/v/tile-cover-boxes
[npm-url]: https://npmjs.org/package/tile-cover-boxes
[build-url]: https://github.com/pirxpilot/tile-cover-boxes/actions/workflows/check.yaml
[build-image]: https://img.shields.io/github/actions/workflow/status/pirxpilot/tile-cover-boxes/check.yaml?branch=main
[deps-image]: https://img.shields.io/librariesio/release/npm/tile-cover-boxes
[deps-url]: https://libraries.io/npm/tile-cover-boxes