
Security News
AI Has Taken Over Open Source
Vibe coding at scale is reshaping how packages are created, contributed, and selected across the software supply chain
@turf/destination
Advanced tools
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.
origin Coord starting point
distance number distance from the origin point
bearing number ranging from -180 to 180
options Object Optional parameters (optional, default {})
var point = turf.point([-75.343, 39.984]);
var distance = 50;
var bearing = 90;
var options = {units: 'miles'};
var destination = turf.destination(point, distance, bearing, options);
//addToMap
var addToMap = [point, destination]
destination.properties['marker-color'] = '#f00';
point.properties['marker-color'] = '#0f0';
Returns Feature<Point> destination point
This module is part of the Turfjs project, an open source module collection dedicated to geographic algorithms. It is maintained in the Turfjs/turf repository, where you can create PRs and issues.
Install this single module individually:
$ npm install @turf/destination
Or install the all-encompassing @turf/turf module that includes all modules as functions:
$ npm install @turf/turf
Geolib is a library for geospatial calculations in JavaScript. It provides similar functionalities to @turf/destination, such as calculating distances, bearings, and destination points. However, Geolib is a more general-purpose library for geospatial calculations, whereas @turf/destination is part of the Turf.js library, which is specifically designed for advanced geospatial analysis.
Geodesy is a library for geodesic calculations in JavaScript. It offers functionalities for calculating distances, bearings, and destination points, similar to @turf/destination. Geodesy focuses on precise geodesic calculations, making it suitable for applications requiring high accuracy. In comparison, @turf/destination is part of the Turf.js library, which provides a broader range of geospatial analysis tools.
FAQs
turf destination module
The npm package @turf/destination receives a total of 1,806,900 weekly downloads. As such, @turf/destination popularity was classified as popular.
We found that @turf/destination demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 9 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Vibe coding at scale is reshaping how packages are created, contributed, and selected across the software supply chain

Security News
npm invalidated all granular access tokens that bypass 2FA after a fresh Mini Shai-Hulud wave compromised 323 npm packages. Staged publishing also entered public preview.

Research
/Security News
Compromised npm package art-template delivered a Coruna-like iOS Safari exploit framework through a watering-hole attack.