I
I
Ibishka2020-01-10 14:37:37
JavaScript
Ibishka, 2020-01-10 14:37:37

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 question

Ask a Question

731 491 924 answers to any question