npm

Don't miss out on this year's npm Pride t-shirt designs!Order your favorites here »

no-network-geocoder

0.0.3 • Public • Published

NPM

no-network-geocoder

Geocode city names without any network requests, by using a lightweight prepopulated SQLite database. Currently only works for US cities.

use

var geoCode = require('../no-network-geocoder');

geoCode('San Francisco').then(function(dataObj){
  // dataObj
};

returned dataObj

{
  "id" : "5391959",
  "fullAddress" : "San Francisco, California, United States",
  "cityName" : "San Francisco",
  "state" : "California",
  "country" : "United States",
  "population" : "805235",
  "latitude" : "37.77493",
  "longitude" : "-122.41942",
  "timezone" : "America/Los_Angeles"
};

install

$ npm install no-network-geocoder

test

$ npm test

Special thanks to https://github.com/mjradwin/geonames-sqlite for writing the original script to convert geonames text data to an actual SQLite database.

install

npm i no-network-geocoder

Downloadsweekly downloads

3

version

0.0.3

license

MIT

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
Report a vulnerability