Skip to content

Finding Points Within a Distance of a Latitude/Longitude Using Bounding Coordinates by Jan Matuschek

Notifications You must be signed in to change notification settings

DoomyTheFroomy/GeoLocation

Repository files navigation

GeoLocation Helper Functions

Finding Points Within a Distance of a Latitude/Longitude Using Bounding Coordinates

JavaScript Style Guide Build Status Greenkeeper badge FOSSA Status

This JavaScript implementation was build up via Jan Matuscheks Java Implementation.

I've tried to implement everything so that the look and feel seems to be the same.

Install

$ npm install GeoLocationHelper

How to Use

Create a new GeoLocation Object

var geoLocation = require('GeoLocation')
// From Degrees
var geoLocCapeTown = geoLocation.fromDegrees(-33.925278, 18.423889)
// From Radians
var myLocation = geoLocation.fromRadians(1.3963, -0.6981)

Get the distance between two locations

var earthRadius = 6371.01
console.log(geoLocCapeTown.distanceTo(myLocation, earthRadius))

License

FOSSA Status

About

Finding Points Within a Distance of a Latitude/Longitude Using Bounding Coordinates by Jan Matuschek

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •