How does navigator.geolocation.getCurrentPosition get your latitude and longitude?

Does it extract that information from your IP address? If not, then how does it get your lat and long coordinates?

Upvotes: 0

Views: 649

Answers (1)

Perrytheplatypus43
Perrytheplatypus43

Reputation: 137

From geotargetly:

"HTML5 geolocation detects latitude and longitude coordinates by using the device's GPS (if available on the device) or the device's mobile/WIFI signal (if GPS is not available. The mobile/WIFI signals are triangulated to work out the latitude and longitude."

Upvotes: 1

Related Questions