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

Popular posts from this blog

java - Incorrect order of records in M-M relationship in hibernate -

command line - Use qwinsta in PowerShell ISE -

php - I want to create a website for polls/survey like this http://www.poll-maker.com/ -