Answer the question
In order to leave comments, you need to log in
How, knowing latitude and longitude, can you find out the name of the visitor's city?
if (navigator.geolocation) {
navigator.geolocation.getCurrentPosition(function(pos) {
const lat = pos.coords.latitude,
long = pos.coords.longitude
});
} else {
console.log("geo location is not supported");
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question