Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

HTML5 Geolocation, GPS Only

Tags:

Is there a way to make HTML5's Geolocation only work, if it is using a GPS device to get the location?

like image 444
John Avatar asked Aug 16 '10 22:08

John


People also ask

Does HTML5 have geolocation?

HTML5 geolocation lets you find the geographic coordinates of a website visitor's current location like the longitude and the latitude. The information provided by HTML 5 geolocation can be used to optimise the browsing experience.

How accurate is HTML5 geolocation?

Depending on the availability of GPS on the device and the quality of the mobile/WIFI signals, HTML5 geolocation can be very accurate i.e. to a street level. Hence it can be used to pin point a device's location making it a very useful technology for websites or apps that require the exact user's location to work.

Which API in HTML5 allows you to identify the location of the user?

The HTML Geolocation API is used to locate a user's position.


1 Answers

I don't believe it's possible, the best you can do is pass true for enableHighAccuracy and use a heuristic based on the accuracy value.

--Edit

I saw a presentation by Remy Sharp last month and he had a useful suggestion: if you use watchPosition instead of getCurrentPosition then you can wait until the location information becomes accurate enough; GPS often takes some time to lock on to satellites so usually getCurrentPosition will just return something from one of the less accurate but more responsive methods.

like image 173
robertc Avatar answered Sep 18 '22 15:09

robertc