all repos — honk @ 5ae93cf80e45ac214f544ef27218ad5b827106a7

my fork of honk

increase gps accuracy second time
Ted Unangst tedu@tedunangst.com
Sat, 05 Oct 2019 13:11:24 -0400
commit

5ae93cf80e45ac214f544ef27218ad5b827106a7

parent

5036d46acc40279489fba5156682addfed218121

1 files changed, 8 insertions(+), 1 deletions(-)

jump to
M views/honkpage.jsviews/honkpage.js

@@ -217,6 +217,11 @@ var el = document.getElementById("donkdescriptor")

el.style.display = "" } var checkinprec = 500.0 +var gpsoptions = { + enableHighAccuracy: false, + timeout: 1000, + maximumAge: 0 +}; function fillcheckin() { if (navigator.geolocation) { navigator.geolocation.getCurrentPosition(function(pos) {

@@ -226,10 +231,12 @@ el.value = Math.round(pos.coords.latitude * checkinprec) / checkinprec

el = document.getElementById("placelonginput") el.value = Math.round(pos.coords.longitude * checkinprec) / checkinprec checkinprec = 10000.0 + gpsoptions.enableHighAccuracy = true + gpsoptions.timeout = 2000 }, function(err) { showelement("placedescriptor") el = document.getElementById("placenameinput") el.value = err.message - }) + }, gpsoptions) } }