[TASK] Limit shown coordinates to 6 decimals

This commit is contained in:
Xaver Maierhofer 2017-01-17 17:00:03 +01:00
parent a617449ba4
commit 9a5038f3f4
No known key found for this signature in database
GPG Key ID: 7FDCE23FD2EC9FE8

View File

@ -8,12 +8,9 @@ define(["chroma-js", "moment/moment", "tablesort", "helper", "moment/locale/de"]
} }
return function (el) { return function (el) {
var latitude = d.nodeinfo.location.latitude;
var longitude = d.nodeinfo.location.longitude;
var a = document.createElement("a"); var a = document.createElement("a");
a.textContent = latitude + ", " + longitude; a.textContent = Number(d.nodeinfo.location.latitude.toFixed(6)) + ", " + Number(d.nodeinfo.location.longitude.toFixed(6));
a.href = "geo:" + d.nodeinfo.location.latitude + "," + d.nodeinfo.location.longitude;
a.href = "geo:" + latitude + "," + longitude;
el.appendChild(a); el.appendChild(a);
}; };
} }