I am exploring ways to enhance the native geolocation function
if(navigator.geolocation) {
navigator.geolocation.getCurrentPosition(function(position) {
var latitude = position.coords.latitude;
var longitude = position.coords.longitude;
});
}
to extract specific details such as the visitor's country name using a comprehensive array.
Despite my efforts, I have only come across features that showcase google maps interface options. The exception being this library which worked perfectly fine in this example, yet failed on my personal computer for unknown reasons. The issue perplexes me.
In any case, do you possess knowledge on how I can directly generate an array comprising data like country and city from longitude and latitude values?