I need to retrieve requesting country using JavaScript or a free 3rd party service.
Anyways, do you know how I can simply get information like country, city, etc. from latitude and longitude values?
>Solution :
Use this web service that can return JSON (along with using jQuery to make things simpler)
let apiKey = '1be9a6884abd4c3ea143b59ca317c6b2';
$.getJSON('https://ipgeolocation.abstractapi.com/v1/?api_key=' + apiKey, function(data) {
console.log(JSON.stringify(data, null, 2));
});
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/2.2.4/jquery.min.js"></script>