HTML5 Geolocation problems on the IPhone
I am working on geolocation api html5, iphone results are disappointing. Tested on city with tall buildings and watchPosition implementation
The main problems are:
Minimum accuracyfound: 49 meters
Normal accuracy: 75m
Returns many repeated positions. Big problem, the same 20 positions in one interval!
Options do not work: enable High Accuracy and maximunAge. Speed variable not work
Running on Firefox Home for iphone, so when the phone is locked, d'ont stops web and GPS. Safari stop web开发者_如何学JAVA when phone is locked.
I suspect bad Safari implementation of this particular HTML5 feature. I'm experiencing the same thing as you. I'm specifying enableHighAccuracy: true, and the best accuracy I get is > 1400 meters. Doesn't Apple believe me when I say I want high accuracy? Native apps are very accurate under the same conditions.
Are you passing the enableHighAccuracy
flag to your getCurrentPosition
call? If not, the iPhone may be using cell triangulation to pinpoint your location (it's hard to know what Apple's internal implementation does, but it seems unlikely to be using the GPS given your results).
Have a read of The specification for getCurrentPosition
- the high accuracy flag as part of the PositionOptions
optional third parameter.
精彩评论