From ae2b4567279ed205d2d8f6e9c16db5c338338e8b Mon Sep 17 00:00:00 2001 From: Ted Unangst Date: Sat, 28 Sep 2019 16:24:55 -0400 Subject: [PATCH] click twice for more gps precision --- views/honkpage.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/views/honkpage.js b/views/honkpage.js index 2d6acbe..10bb6fc 100644 --- a/views/honkpage.js +++ b/views/honkpage.js @@ -202,16 +202,17 @@ function updatedonker() { 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"