countries-cities-geo
Countries & City Names, including GEO coordinates (Lat, Lng) + country ISO name and full name
Completely rewrote from old package name called pangnote-cities, now have the following:
- 250 countries
-
17k cities (big cities), you can get list of cities using getCities(country_name)
- each country have detailed information (common & native names, sub/region, capital, currency, tld, etc)
- GEO locations for each country & city
- convert country name to ISO code & back
API
- getCountries() - get array of countries
const p = require('pangnote-cities')
p.getCountries()
- getCountryNames() - get array of country names
const p = require('pangnote-cities')
p.getCountryNames()
- getCities('Ukraine') - get city names of Ukraine
const p = require('pangnote-cities')
p.getCities('Ukraine')
- getCountryGeo('Ukraine') - get country GEO location [lat, lng]
const p = require('pangnote-cities')
p.getCountryGeo('Ukraine')
- getCityGeo('Ukraine', 'Kharkiv')- get city GEO location [lat, lng]
const p = require('pangnote-cities')
p.getCityGeo('Ukraine', 'Kharkiv')
- getCountryISO('Ukraine') - get ISO code by country name: Ukraine -> UA
const p = require('pangnote-cities')
p.getCountryISO('Ukraine')
- getISOCountry('UA') - get country name by ISO code: UA -> Ukraine
const p = require('pangnote-cities')
p.getISOCountry('UA')