From a617449ba439f208ee9ddaadd4fc7ce5356a967e Mon Sep 17 00:00:00 2001 From: Xaver Maierhofer Date: Tue, 17 Jan 2017 16:35:41 +0100 Subject: [PATCH] [TASK] Show decimmal instead of degree, minute --- lib/infobox/node.js | 23 +---------------------- 1 file changed, 1 insertion(+), 22 deletions(-) diff --git a/lib/infobox/node.js b/lib/infobox/node.js index 5b3994a..393cbd4 100644 --- a/lib/infobox/node.js +++ b/lib/infobox/node.js @@ -3,26 +3,6 @@ define(["chroma-js", "moment/moment", "tablesort", "helper", "moment/locale/de"] "use strict"; function showGeoURI(d) { - function showLatitude(d) { - var suffix = Math.sign(d) > -1 ? "' N" : "' S"; - d = Math.abs(d); - var a = Math.floor(d); - var min = (d * 60) % 60; - a = (a < 10 ? "0" : "") + a; - - return a + "° " + min.toFixed(3) + suffix; - } - - function showLongitude(d) { - var suffix = Math.sign(d) > -1 ? "' E" : "' W"; - d = Math.abs(d); - var a = Math.floor(d); - var min = (d * 60) % 60; - a = (a < 100 ? "0" + (a < 10 ? "0" : "") : "") + a; - - return a + "° " + min.toFixed(3) + suffix; - } - if (!helper.hasLocation(d)) { return undefined; } @@ -31,8 +11,7 @@ define(["chroma-js", "moment/moment", "tablesort", "helper", "moment/locale/de"] var latitude = d.nodeinfo.location.latitude; var longitude = d.nodeinfo.location.longitude; var a = document.createElement("a"); - a.textContent = showLatitude(latitude) + " " + - showLongitude(longitude); + a.textContent = latitude + ", " + longitude; a.href = "geo:" + latitude + "," + longitude; el.appendChild(a);