simple-geocoder

0.1.2 • Public • Published

❗❗ Deprecated - Please use arcgis-rest-js::arcgis-rest-geocoder

simple-geocoder

A simple geocoder for node.

Installation

$ npm install simple-geocoder

Example Usage

To geocode:

var geocoder = require('simple-geocoder');
geocoder.geocode('1600 Pennsylvania Ave NW, Washington, DC 20500', function(success, locations) {
	if(success) {
		console.log("Location: ", locations.x, locations.y);
	}
});

To reverse-geocode:

var geocoder = require('simple-geocoder');
geocoder.reverse('38.898723718725705,-77.038093585549746', function(success, result) {
	if(success) {
		console.log("Location: ", result.Address, result.City, result.Region, result.Postal, result.CountryCode);
	}
});

Features

  • Simple geocoding and reverse geocoding, via object or string
  • Uses ArcGIS Online free geocoder. For details on allowed uses of the AGOL geocoder, see http://geocode.arcgis.com

Philosophy

To provide a dead-simple geocoder package that utilizes the ArcGIS Online geocoder by default.

More Information

Running Tests

To run the test suite, first invoke the following command within the repo, installing the development dependencies:

$ npm install

Then run the tests:

$ grunt

Contributors

Author: Gavin Rehkemper

License

Code for this package under the MIT license. Uses ArcGIS Online free geocoder by default. Please see http://geocode.arcgis.com for allowed usage.

Readme

Keywords

Package Sidebar

Install

npm i simple-geocoder

Weekly Downloads

13

Version

0.1.2

License

MIT

Unpacked Size

9.8 kB

Total Files

7

Last publish

Collaborators

  • gavinr