JSPM

haversine-offset

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

Haversine offset formula in Javascript. Uses meters. Nothing more.

Package Exports

  • haversine-offset

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 (haversine-offset) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

haversine-offset

build status Version

js-standard-style

Haversine offset formula in Javascript. Uses meters. Nothing more.

Example

Offset is in meters, x is along the longitudinal axis (East / West), y along the latitudinal axis (North / South).

var haversineOffset = require('haversine-offset')

var a = { latitude: -37.8136, longitude: 144.9631 }
var offset = { x: 100, y: 150 }

console.log(haversineOffset(a, offset))
// { lat: -37.812252527073824, lng: 144.96423709426978 },

lat, lng variants will also work:

var haversineOffset = require('haversine-offset')

var a = { lat: -37.8136, lng: 144.9631 }
var offset = { x: 100, y: 150 }

console.log(haversineOffset(a, offset))
// { lat: -37.812252527073824, lng: 144.96423709426978 },

License MIT