country-iso-to-coordinates

Get country coordinates and name from ISO code

Usage no npm install needed!

<script type="module">
  import countryIsoToCoordinates from 'https://cdn.skypack.dev/country-iso-to-coordinates';
</script>

README

Description

Get country latitude and longitude and name based on ISO code.

Example

npm i country-iso-to-coordinates

import IsoToLatLong from 'country-iso-to-coordinates';

const country = IsoToLatLong['GB'];

console.log(country); // { coordinate: [ '55.378051', '-3.435973' ], name: 'United Kingdom' }