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

php - failed to open stream: HTTP request failed! HTTP/1.0 400 Bad Request -

java - How to filter a backspace keyboard input -

java - Show Soft Keyboard when EditText Appears -