John
John

Reputation: 460

HTML5 Geolocation, GPS Only

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

Upvotes: 23

Views: 12645

Answers (2)

krycek
krycek

Reputation: 1

Check out http://code.google.com/p/mobile-gps-web-gate/

Upvotes: 0

robertc
robertc

Reputation: 75777

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.

Upvotes: 18

Related Questions