1.0.1 • Published 9 years ago

geome v1.0.1

Weekly downloads
-
License
GPL-3.0
Repository
bitbucket
Last release
9 years ago

Geome

A simple NPM module for geocoding and reverse geocoding addresses with the Google Maps API.

Retrieve a Google API key from the developer console first

Usage

  1. To geocode an address:
const Geome = require('geome');
const key = "YOUR_API_KEY";
const geome = new Geome(key);
const address = '1600 Amphitheatre Pkwy, Mountain View, CA 94043, USA';

geome.geocode(address, (err, res) => {
  console.log(err);
  console.log(res);
});
  1. To reverse lookup an address:
const Geome = require('geome');
const key = "YOUR_API_KEY";
const geome = new Geome(key);
const coords = {
  lat: 37.4223664,
  long: -122.084406
};

geome.reverseGeocode(coords, function(err, res) {
  console.log(err);
  console.log(res);
});

For output examples see https://developers.google.com/maps/documentation/geocoding/start

1.0.1

9 years ago

1.0.0

9 years ago