country-iso
![npm dev dependencies](https://david-dm.org/simonepri/country-iso/dev-status.svg)
🗺 Get ISO 3166-1 alpha-3 country code for geographic coordinates.
Install
$ npm install --save country-iso
Usage
const countryIso = require('country-iso');
countryIso.get(41.9028, 12.4964);
The accuracy of the maps has been tested with 23785 cities.
API
get(lat, lng) ⇒ Array.<string>
Searches for every country which contains the point (lat, lng).
Returns: Array.<string>
- Array of ISO 3166 alpha-3 country code for the geographic
coordinates.
Param | Type | Description |
---|
lat | number | The latitude of the point. |
lng | number | The longitude of the point. |
Authors
See also the list of contributors who participated in this project.
License
This project is licensed under the MIT License - see the LICENSE file for details.