turf-destination

WebJar for turf-destination

License

License

MIT
GroupId

GroupId

org.webjars.npm
ArtifactId

ArtifactId

turf-destination
Last Version

Last Version

3.0.12
Release Date

Release Date

Type

Type

jar
Description

Description

turf-destination
WebJar for turf-destination
Project URL

Project URL

http://webjars.org
Source Code Management

Source Code Management

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

Download turf-destination

How to add to project

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

Dependencies

compile (2)

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

Project Modules

There are no modules declared in this project.

turf-destination

build status

turf destination module

turf.destination(start, distance, bearing, units)

Takes a Point and calculates the location of a destination point given a distance in degrees, radians, miles, or kilometers; and bearing in degrees. This uses the Haversine formula to account for global curvature.

Parameters

parameter type description
start Feature.<Point> starting point
distance Number distance from the starting point
bearing Number ranging from -180 to 180
units String miles, kilometers, degrees, or radians

Example

var point = {
  "type": "Feature",
  "properties": {
    "marker-color": "#0f0"
  },
  "geometry": {
    "type": "Point",
    "coordinates": [-75.343, 39.984]
  }
};
var distance = 50;
var bearing = 90;
var units = 'miles';

var destination = turf.destination(point, distance, bearing, units);
destination.properties['marker-color'] = '#f00';

var result = {
  "type": "FeatureCollection",
  "features": [point, destination]
};

//=result

Returns Feature.<Point>, destination point

Installation

Requires nodejs.

$ npm install turf-destination

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