turf-bearing

WebJar for turf-bearing

License

License

MIT
GroupId

GroupId

org.webjars.npm
ArtifactId

ArtifactId

turf-bearing
Last Version

Last Version

3.0.12
Release Date

Release Date

Type

Type

jar
Description

Description

turf-bearing
WebJar for turf-bearing
Project URL

Project URL

http://webjars.org
Source Code Management

Source Code Management

https://github.com/turf-junkyard/turf-bearing

Download turf-bearing

How to add to project

<!-- https://jarcasting.com/artifacts/org.webjars.npm/turf-bearing/ -->
<dependency>
    <groupId>org.webjars.npm</groupId>
    <artifactId>turf-bearing</artifactId>
    <version>3.0.12</version>
</dependency>
// https://jarcasting.com/artifacts/org.webjars.npm/turf-bearing/
implementation 'org.webjars.npm:turf-bearing:3.0.12'
// https://jarcasting.com/artifacts/org.webjars.npm/turf-bearing/
implementation ("org.webjars.npm:turf-bearing:3.0.12")
'org.webjars.npm:turf-bearing:jar:3.0.12'
<dependency org="org.webjars.npm" name="turf-bearing" rev="3.0.12">
  <artifact name="turf-bearing" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.webjars.npm', module='turf-bearing', version='3.0.12')
)
libraryDependencies += "org.webjars.npm" % "turf-bearing" % "3.0.12"
[org.webjars.npm/turf-bearing "3.0.12"]

Dependencies

compile (1)

Group / Artifact Type Version
org.webjars.npm : turf-invariant jar [3.0.12,4)

Project Modules

There are no modules declared in this project.

turf-bearing

build status

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
org.webjars.npm

deprecated turf modules: do not use or reference, for redirects only

turf is now a monorepo: all turf modules are in Turfjs/turf

Versions

Version
3.0.12