davidwood / node-geopoint

Representation of a geographic point for node.js and the browser
MIT License
79 stars 17 forks source link

Geographic Point

GeoPoint represents a geographic point for node.js and the browser, and provides distance between points and radius bounding box calculations.

Installation

npm install geopoint 

Usage

var GeoPoint = require('geopoint'),
    statueOfLiberty = new GeoPoint(40.689604, -74.04455);

Constructor options

Methods

Static Methods

Browser Support

The GeoPoint constructor is exposed via window.GeoPoint.

Running Tests

Cachetree tests require Mocha and can be run with either npm test. You can specify Mocha options, such as the reporter, by adding a mocha.opts file, which is ignored by git, to the test directory.

Credits

This library is derived from the code presented in Finding Points Within a Distance of a Latitude/Longitude Using Bounding Coordinates by Jan Philip Matuschek.