https://github.com/pirxpilot/plumper
Makes your polyline look fat
https://github.com/pirxpilot/plumper
polyline
Last synced: 11 months ago
JSON representation
Makes your polyline look fat
- Host: GitHub
- URL: https://github.com/pirxpilot/plumper
- Owner: pirxpilot
- License: mit
- Created: 2013-08-16T14:47:28.000Z (almost 13 years ago)
- Default Branch: main
- Last Pushed: 2024-03-19T09:27:57.000Z (over 2 years ago)
- Last Synced: 2024-11-21T15:11:43.586Z (over 1 year ago)
- Topics: polyline
- Language: JavaScript
- Homepage: http://pirxpilot.github.io/plumper
- Size: 135 KB
- Stars: 4
- Watchers: 5
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: Readme.md
- Changelog: History.md
- License: License.txt
Awesome Lists containing this project
README
[![NPM version][npm-image]][npm-url]
[![Build Status][build-image]][build-url]
[![Dependency Status][deps-image]][deps-url]
# plumper
Makes your polyline look fat using routeboxer algorithm.
Check out [the live demo][demo].
## Installation
Install with [npm]:
$ npm install plumper
## API
```javascript
// polyline is a set of points
var polyline = [[0,2], [3,4], [7,8]];
// fat is a factor corresponding to the width of the polyline
var fat = 5;
// polygon is an array of points outlining a polygon that completely encompasses a line
var polygon = plumper(polyline, fat);
// if you're OK with slighly larger number of polygons, but you care about speed
var polygon = plumper(polyline, fat, false);
```
# License
The MIT License (MIT)
Copyright (c) 2013 [Damian Krzeminski](https://pirxpilot.me)
[routeboxer]: http://google-maps-utility-library-v3.googlecode.com/svn/trunk/routeboxer/docs/examples.html
[demo]: http://pirxpilot.github.io/plumper/
[npm]: https://www.npmjs.org/
[npm-image]: https://img.shields.io/npm/v/plumper
[npm-url]: https://npmjs.org/package/plumper
[build-url]: https://github.com/pirxpilot/plumper/actions/workflows/check.yaml
[build-image]: https://img.shields.io/github/actions/workflow/status/pirxpilot/plumper/check.yaml?branch=main
[deps-image]: https://img.shields.io/librariesio/release/npm/plumper
[deps-url]: https://libraries.io/npm/plumper