##search-geonames
General
Node.js module for geocoding and reverse geocoding.
Uses service Geonames geocoding API.
Geocoding. Geonames API - search by query.
It is the process of matching address with geographic coordinates.
Response example.
Reverse Geocoding. Geonames API - findNearBy.
It is the process of matching geographic coordinates with address.
Response example.
Wikipedia, search data by query about location.
Geonames API - Wikipedia fulltext search.
Response example.
Wikipedia, search data by coordinates about location.
Geonames API - find nerby Wikipedia Entries.
Response example.
Output format like JSON.
Usage Limits
Installation
npm install search-geonames [-S]
Usage example
var geonames = require('search-geonames');
const ADDRESS = 'Kyiv, Khreshchatyk';
const LATITUDE = '50.45';
const LONGITUDE = '30.523';
const LANGUAGE = 'en';
var options = {
language: LANGUAGE
};
function callback (error, result) {
if (error) console.log(error);
else console.log(result);
}
geonames.searchByQuery(ADDRESS, callback, options);
geonames.findNearBy(LATITUDE, LONGITUDE, callback, options);
communicator.wikiSearchByQuery(ADDRESS, callback, options);
communicator.wikiFindNearBy(LATITUDE, LONGITUDE, callback, options);