SimpleGeoLoc simple items with geolocation, near items function
Simple geolocation functions. Add items with geolocation information, then find items near a point/distance.
Via npm on Node:
npm install simplegeoloc
Reference in your program:
var sgl = require'simplegeoloc';
Create an item store:
var store = sglcreateStore;
Add items to store:
storeaddlatitude longitude item;
storeadd-34.47706 -58.50177 city: 'Acassuso' geoname_id: 3436508 ;storeadd-34.74471 -58.40410 city: 'Banfield' geoname_id: 3436152 ;
Items near to a point:
var items = storenear-34.47706 -58.50177;
item (with the original associated item data).
12° 20.736′ N, 98° 45.924′ W, etc)
If you submit a pull request, please be sure to add or update corresponding
test cases, and ensure that
npm test continues to pass.