Skip to content

A library for accessing the Geocodio geocoder service.

License

Notifications You must be signed in to change notification settings

Soulfire86/node-geocodio

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Geocodio

A library for accessing the Geocodio geocoder service.

Installation

npm install geocodio

Usage

Configuration

var Geocodio = require('geocodio');

var config = {
    api_key: 'APIKEY'
}

var geocodio = new Geocodio(config);

Geocode a single address

var address = 'One Embarcadero Center, 9th Floor, San Francisco, CA 94111';

geocodio.geocode(address, function(err, response){
    if (err) throw err;

    console.log(response);
});

Bulk geocode a list of addresses

var addresses = [
  'One Embarcadero Center, 9th Floor, San Francisco, CA 94111',
  '880 Broadway, New York, NY, 10003'
];

geocodio.geocode(addresses, function(err, response){
    if (err) throw err;

    console.log(response);
});

Reverse geocode

var coordinate = '42.583448,-71.005738';

geocodio.reverse(coordinate, function(err, response){
    if (err) throw err;

    console.log(response);
});

Bulk reverse geocode a list of coordinates

var coordinates = [
  '42.583448,-71.005738',
  '42.584714,-71.007359'
];

geocodio.reverse(coordinates, function(err, response){
    if (err) throw err;

    console.log(response);
});

Parse an address

var address = 'One Embarcadero Center, 9th Floor, San Francisco, CA 94111';

geocodio.parse(address, function(err, response){
    if (err) throw err;

    console.log(response);
});

Changelog

  • 0.0.1: Initial implementation of geocode and parse endpoints
  • 0.1.0: Introduces reverse endpoint

About

A library for accessing the Geocodio geocoder service.

Resources

License

Stars

Watchers

Forks

Packages

No packages published