all repos — honk @ 154a4fa2b4ec3a9a893afa88794da747f34c8973

my fork of honk

click twice for more gps precision
Ted Unangst tedu@tedunangst.com
Sat, 28 Sep 2019 16:24:55 -0400
commit

154a4fa2b4ec3a9a893afa88794da747f34c8973

parent

f7bd1d575517bc3e6c312d5a1f112323c2207673

1 files changed, 4 insertions(+), 3 deletions(-)

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

@@ -202,16 +202,17 @@ el.children[1].textContent = el.children[0].value.slice(-20)

var el = document.getElementById("donkdescriptor") el.style.display = "" } +var checkinprec = 500.0 function fillcheckin() { if (navigator.geolocation) { navigator.geolocation.getCurrentPosition(function(pos) { - var precision = 500.0 var el = document.getElementById("placedescriptor") el.style.display = "block" el = document.getElementById("placelatinput") - el.value = Math.round(pos.coords.latitude * precision) / precision + el.value = Math.round(pos.coords.latitude * checkinprec) / checkinprec el = document.getElementById("placelonginput") - el.value = Math.round(pos.coords.longitude * precision) / precision + el.value = Math.round(pos.coords.longitude * checkinprec) / checkinprec + checkinprec = 10000.0 }, function(err) { var el = document.getElementById("placedescriptor") el.style.display = "block"