uiwebview watchposition continuous callback

Discussion in 'iOS Programming' started by binjaja, Nov 26, 2010.

  1. binjaja macrumors newbie

    Joined:
    Nov 13, 2008
    #1
    I am using watchPosition inside of UIWebview to track a users position as follows:

    watchId = navigator.geolocation.watchPosition(handle_geolocation_query,handle_errors,{enableHighAccuracy:true});



    The callback function handle_geolocation_query is being called continuously, every few seconds, even though the users position doesn’t change at all. Isn’t it only supposed to be called if the users position changes?

    I also tried the above without the enableHighAccuracy and saw the same results.
     
  2. ianray macrumors 6502

    Joined:
    Jun 22, 2010
    Location:
    @
    #2
    GPS coordinates change, slightly, even when stationary. Do you see changes in position.coords.latitude and position.coords.longitude?
     

Share This Page