html5 - HTML 5 - Geolocation : position.coords.speed never come back to zero -
i'm using geolocation :
navigator.geolocation.watchposition(successcallback, errorcallback, {maximumage:0,enablehighaccuracy:true}); var speed_convert = position.coords.speed; speed_convert = speed_convert * 3.6; speed_convert = math.round(speed_convert);
when used application in car speed never come 0 km/h.
there more parameters set ?
thank you
change this,
navigator.geolocation.watchposition(successcallback, errorcallback, {maximumage:0,enablehighaccuracy:true});
to this,
navigator.geolocation.watchposition(successcallback, errorcallback, {maximumage:0,enablehighaccuracy:true,timeout=1000});
and have life!
Comments
Post a Comment