@turf/rhumb-destination
TypeScript icon, indicating that this package has built-in type declarations

6.5.0 • Public • Published

@turf/rhumb-destination

rhumbDestination

Returns the destination Point having travelled the given distance along a Rhumb line from the origin Point with the (varant) given bearing.

Parameters

  • origin Coord starting point
  • distance number distance from the starting point
  • bearing number varant bearing angle ranging from -180 to 180 degrees from north
  • options Object Optional parameters (optional, default {})
    • options.units string can be degrees, radians, miles, or kilometers (optional, default 'kilometers')
    • options.properties Object translate properties to destination point (optional, default {})

Examples

var pt = turf.point([-75.343, 39.984], {"marker-color": "F00"});
var distance = 50;
var bearing = 90;
var options = {units: 'miles'};

var destination = turf.rhumbDestination(pt, distance, bearing, options);

//addToMap
var addToMap = [pt, destination]
destination.properties['marker-color'] = '#00F';

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.

Installation

Install this module individually:

$ npm install @turf/rhumb-destination

Or install the Turf module that includes it as a function:

$ npm install @turf/turf

Dependencies (2)

Dev Dependencies (10)

Package Sidebar

Install

npm i @turf/rhumb-destination

Weekly Downloads

434,435

Version

6.5.0

License

MIT

Unpacked Size

14.5 kB

Total Files

7

Last publish

Collaborators

  • twelch
  • jamesmilneruk
  • rowanwins
  • tmcw
  • morganherlocker
  • tcql
  • mdfedderly