3.0.12 • Published 8 years ago
turf-along v3.0.12
turf-along
turf.along(Line, Distance, [units=miles])
Returns a point at a specified distance along a line.
Parameters
parameter | type | description |
---|---|---|
Line | LineString | to move along |
Distance | Number | to move |
[units=miles] | String | optional: can be degrees, radians, miles, or kilometers |
Example
var line = {
"type": "Feature",
"properties": {},
"geometry": {
"type": "LineString",
"coordinates": [
[
-77.0316696166992,
38.878605901789236
],
[
-77.02960968017578,
38.88194668656296
],
[
-77.02033996582031,
38.88408470638821
],
[
-77.02566146850586,
38.885821800123196
],
[
-77.02188491821289,
38.88956308852534
],
[
-77.01982498168944,
38.89236892551996
]
]
}
}
var along = turf.along(line, 1, 'miles');
//=along
Installation
Requires nodejs.
$ npm install turf-along
Tests
$ npm test
3.0.12
8 years ago
3.0.10
8 years ago
3.0.7-canary.ae89c8b3
8 years ago
3.0.7
8 years ago
3.0.6
8 years ago
3.0.5-canary.4f73aa1a
8 years ago
3.0.5
8 years ago
3.0.4
8 years ago
3.0.1
8 years ago
3.0.0-canary.7879bf6c
8 years ago
3.0.0-canary.2f5f7167
8 years ago
1.0.2
9 years ago
1.0.1
9 years ago
1.0.0
9 years ago