history: show link distance in popup

This commit is contained in:
Nils Schneider 2015-03-20 17:58:20 +01:00
parent 92257c463f
commit 31fe68129f

View File

@ -209,6 +209,10 @@ function addLinksToMap(map, graph) {
var line = L.polyline(latlngs, opts)
var distance = new Intl.NumberFormat("de-DE", {maximumFractionDigits: 0}).format(latlngs[0].distanceTo(latlngs[1]))
line.bindPopup(d.source.node.nodeinfo.hostname + " " + d.target.node.nodeinfo.hostname + "<br><strong>" + distance + " m</strong>")
return line
})