Geolocation watchPosition updating slowly -
is normal onsuccess routine geolocation.watchposition
update every second, when maximumage
set 0?
i detect followed: onsuccess value compass.watchheading
updating every 0,1 sec , showing in div. when calling value document.getelementbyid
in onsuccess routine geolocation.watchposition
, displaying in div nearby see value updating, seems every second or so.
i need use heading value within results of location, that's why noticed.
to make visible:
function onsuccess1(heading) { direction = math.round(heading.magneticheading); // debug info document.getelementbyid('heading').innerhtml = direction; } function onsuccess2(position) { positionlat = position.coords.latitude; positionlong = position.coords.longitude; var direction = document.getelementbyid('heading').innerhtml; // debug info document.getelementbyid('headingcontrole').innerhtml = direction; } <div id = "debug"> <span id = "heading"></span><span id = "headingcontrole"></span> </div>
Comments
Post a Comment