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

geocoder.js

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

geocoder.js

Fast offline coarse Geocoder

  • 1.1.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
Maintainers
1
Weekly downloads
 
Created
Source

geocoder.js

Fast offline coarse Geocoder based on GeoNames data.

Usage

var geocoder = require('geocoder');

geocoder('Big Apple', function (location) {
	/*
	{
		id: '5128581',
		name: 'New York City',
		country: 'US',
		latitude: '40.71427',
		longitude: '-74.00597',
		alternate: '0',
		population: '8175133'
	}
	*/

	console.log(location);
});

Install

npm install geocoder.js

Build Database

wget -q http://download.geonames.org/export/dump/countryInfo.txt -O ./node_modules/geocoder.js/data/geonames/countryInfo.txt && \
wget -q http://download.geonames.org/export/dump/cities1000.zip -O ./node_modules/geocoder.js/data/geonames/cities1000.zip && \
wget -q http://download.geonames.org/export/dump/alternateNames.zip -O ./node_modules/geocoder.js/data/geonames/alternateNames.zip && \
unzip ./node_modules/geocoder.js/data/geonames/cities1000.zip -d ./node_modules/geocoder.js/data/geonames/ && \
unzip ./node_modules/geocoder.js/data/geonames/alternateNames.zip -d ./node_modules/geocoder.js/data/geonames/ && \
rm ./node_modules/geocoder.js/data/geonames/*.zip && \
node ./node_modules/geocoder.js/data/build.js

License

MIT

Keywords

FAQs

Package last updated on 21 Jun 2015

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