rapideditor / country-coder

📍➡️ 🇩🇰 Convert longitude-latitude pairs to ISO 3166-1 codes quickly and locally
https://ideditor.codes
ISC License
228 stars 16 forks source link

ISO 3166 of countries with Sovereign states #122

Closed AlexPerathoner closed 1 year ago

AlexPerathoner commented 1 year ago

Some countries, which have a ISO 3166-1 entry return the Sovereign state's country code.

Example:

"lng": -65.0481,
"lat": 32.177

is a location in Bermuda, which has a country code: https://www.iso.org/obp/ui/#iso:code:3166:BM . However, GB gets returned (I suppose because in its entry there is a "country":"GB" property).

List of countries that have this same problem:

AlexPerathoner commented 1 year ago

Later found out about the { level: "territory" } parameter