2

While I am developing a web app, I am using HTML5 Geolocation API. I have done the following steps:

  1. I turned off my WiFi connection on my desktop computer.
  2. I triggered a position request using :

    var params = {enableHighAccuracy: true, timeout:3600, maximumAge:60000};
    navigator.geolocation.getCurrentPosition( reportPosition, gpsError, params );
    
  3. I run my HTML code using Google Chrome Browser [version 41.0.2272.89 (64-bit)] and I found out that gpsError function has been called twice. In the first time I got an error code POSITION_UNAVAILABLE which makes sense to me since the connection was off. But surprisingly, I found out that the error code in the second time is TIMEOUT.

  4. I run the same code on Safari [version 8.0.4 (10600.4.10.7)] and the gpsError function was called only once with error code POSITION_UNAVAILABLE

  5. I opened the geolocation standard and I found out the following steps:

    enter image description here

But in section 5.2 PositionOption interface , it states the following: enter image description here

So I guess chrome violates the standard of Geolocation API because it does not make sense to me to invoke error callback with TIMEOUT after knowing the fact that postion is not available i.e. invoking error callback with POSITION_UNAVAILABLE

Which one is considered to be compliant with the standard, the chrome or safari?

Wael Showair
  • 3,092
  • 2
  • 22
  • 29

0 Answers0