3.0.12 • Published 8 years ago
turf-bearing v3.0.12
turf-bearing
turf bearing module
turf.bearing(start, end)
Takes two Point|points and finds the geographic bearing between them.
Parameters
parameter | type | description |
---|---|---|
start | Feature.\<Point> | starting Point |
end | Feature.\<Point> | ending Point |
Example
var point1 = {
"type": "Feature",
"properties": {
"marker-color": '#f00'
},
"geometry": {
"type": "Point",
"coordinates": [-75.343, 39.984]
}
};
var point2 = {
"type": "Feature",
"properties": {
"marker-color": '#0f0'
},
"geometry": {
"type": "Point",
"coordinates": [-75.534, 39.123]
}
};
var points = {
"type": "FeatureCollection",
"features": [point1, point2]
};
//=points
var bearing = turf.bearing(point1, point2);
//=bearing
Returns Number
, bearing in decimal degrees
Installation
Requires nodejs.
$ npm install turf-bearing
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.1
8 years ago
3.0.0-canary.7879bf6c
8 years ago
3.0.0-canary.2f5f7167
8 years ago
1.0.2
8 years ago
1.0.1
9 years ago
1.0.0
9 years ago
0.0.2
10 years ago
0.0.1
10 years ago