Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

node-geocoder

Package Overview
Dependencies
Maintainers
1
Versions
119
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

node-geocoder

node geocoding library

  • 0.2.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
52K
decreased by-4.96%
Maintainers
1
Weekly downloads
 
Created
Source

node-geocoder

Build Status

Node library for geocoding and reverse geocoding

Currently in development

instalation

npm install node-geocoder

Geocoder Provider

  • google : GoogleGeocoder support adress geocoding and reverse geocoding
  • freegeoip : FreegeoipGeocoder support ip geocoding
  • datasciencetoolkit : DataScienceToolkitGeocoder support ip v4 geocoding
  • openstreetmap : OpenStreetMapGeocoder support adress geocoding and reverse geocoding

Http adapter

  • http : This adapter use Http nodejs library (by default)
  • requestify : This adapter use Requestify library (you need to install requestify)

Formatter

  • gpx : format result using GPX format

Usage example

var geocoderProvider = 'google';
var httpAdapter = 'http';
var formatter = null;

var geocoder = require('node-geocoder').getGeocoder(geocoderProvider, httpAdapter, formatter);

geocoder.geocode('29 champs elysée paris', function(err, res) {
    console.log(res);
});

// output :
[{
    latitude: 48.8698679,
    longitude: 2.3072976,
    country: 'France',
    countryCode: 'FR',
    city: 'Paris',
    zipcode: '75008',
    streetName: 'Champs-Élysées',
    streetNumber: '29'
}]

More

You can improve this project by adding new geocoder or http adapter

For run tests just npm test

Extending node geocoder

you can add new geocoder by implementing the two method geocode & reverse :

var geocoder = {
    geocode: function(value, callback) { },
    reverse: function(lat, lng, callback) { }
}

Roadmap

add results formating more documentation more provider

Keywords

FAQs

Package last updated on 21 Oct 2013

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc