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 | distance units |
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'
var destination = destination(point1, distance, bearing, units)
console.log(destination)