JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 14370
  • Score
    100M100P100Q128069F
  • License MIT

turf destination module

Package Exports

  • turf-destination

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (turf-destination) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

turf-destination

Calculates the destination point given one point feature, distance in degrees, radians, miles, or kilometers, and bearing in degrees. This uses the haversine formula to account for global curvature.

###Install

npm install turf-destination

###Parameters

name description
point1 point feature
distance point feature
bearing number (-180 - 180)
units 'miles' or 'kilometers'

###Usage

destination(point1, distance, bearing, units)

###Example

var destination = require('turf-destination')
var point = require('turf-point')

var point1 = point(-75.343, 39.984)
var distance = 100
var bearing = 90
var units = 'miles' // or 'kilometers', 'degrees', 'radians'

var destination = destination(point1, distance, bearing, units)

console.log(destination)