Mine behaves as expected, try my code out: <http://geolocation.beltoft.dk/>
It stops the geolocation process as soon as the accuracy is below 100m. /Mogens On 09/12/2011 09:17 "Thoern" <[email protected]> wrote: > Funny thing, after upgradeing to ios 5 and its new version of Safari I > can not shut of the geolocation, it continues to track the position > after turning it of, any ideas? It worked fine in previous versions of > safari/ios. > I have a checkbox that one can turn of the geolocation...code below : > > > > > Starting geolocation > if (navigator.geolocation) { > watchID = navigator.geolocation.watchPosition(foundLocation, > geo_error, { enableHighAccuracy: true, maximumAge: 30000, timeout: > 27000 }); > > } else { bla bla bla... > > > > > > Shuting of code > > function clearWatch(watchID) { > if (document.lagerform.chkgps.checked == false) { > window.navigator.geolocation.clearWatch(watchID); > > } > else { > watchID = > navigator.geolocation.watchPosition(foundLocation, geo_error, > { enableHighAccuracy: true, maximumAge: 30000, timeout: 27000 }); > > } > } > -- You received this message because you are subscribed to the Google Groups "iPhoneWebDev" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/iphonewebdev?hl=en.
