geolocationhelper

1.0.1 • Public • Published

GeoLocation Helper Functions

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

[![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com) [![Build Status](https://travis-ci.org/DoomyTheFroomy/GeoLocation.svg?branch=develop)](https://travis-ci.org/DoomyTheFroomy/GeoLocation)

This JavaScript implementation was build up via [Jan Matuscheks Java Implementation](http://janmatuschek.de/LatitudeLongitudeBoundingCoordinates).

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))

Package Sidebar

Install

npm i geolocationhelper

Weekly Downloads

2

Version

1.0.1

License

MIT

Last publish

Collaborators

  • doomythefroomy