Is there a way to make HTML5’s Geolocation only work, if it is using a GPS device to get the location?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
I don’t believe it’s possible, the best you can do is pass
truefor 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
watchPositioninstead ofgetCurrentPositionthen you can wait until the location information becomes accurate enough; GPS often takes some time to lock on to satellites so usuallygetCurrentPositionwill just return something from one of the less accurate but more responsive methods.