Skip to content

rahar/node-city-reverse-geocoder

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

node-city-reverse-geocoder

A simple, fast, database-less reverse geocoder for Node.js

Install

npm install city-reverse-geocoder

Usage

An example of using the tree:

var crg = require('city-reverse-geocoder');

// Return the nearest city to (48.8567, 2.3508) in kilometers
console.log(crg(48.8567, 2.3508));

// Return the nearest city to (48.8567, 2.3508) in miles
console.log(crg(48.8567, 2.3508, 1, 'mi'));

// Return the top 3 nearest cities to (48.8567, 2.3508) in kilometers
console.log(crg(48.8567, 2.3508, 3 /*, 'km' (default) */));

// Return the top 3 nearest cities to (48.8567, 2.3508) in miles
console.log(crg(48.8567, 2.3508, 3, 'mi'));

About

A simple, fast, database-less city reverse geocoder for Node.js

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%