geodb-nearby-cities
v1.0.1
Published
A Node.js wrapper for the GeoDB Cities API to find nearby cities
Downloads
2
Readme
GeoDB Nearby Cities Wrapper
A Node.js wrapper for the GeoDB Cities API to find nearby cities.
Installation
Usage
const GeoDBNearByCities = require('geodb-nearby-cities-wrapper');
const apiKey = 'YOUR_RAPIDAPI_KEY';
const apiHost = 'wft-geo-db.p.rapidapi.com';
const geodb = new GeoDBNearByCities(apiKey, apiHost);
async function findNearbyCities() {
try {
const result = await geodb.getNearByCities(40.7128, -74.0060, 100, 1000000, 5);
console.log(result);
} catch (error) {
console.error('Error:', error.message);
}
}
findNearbyCities();