leaflet.label

This commit is contained in:
Nils Schneider 2015-03-25 02:14:56 +01:00
commit 52434ff06c
4 changed files with 71 additions and 2 deletions

View file

@ -7,7 +7,7 @@ define(function () {
var m = L.circleMarker([d.nodeinfo.location.latitude, d.nodeinfo.location.longitude], iconFunc(d))
m.on('click', gotoAnything.node(d, false))
m.bindPopup(d.nodeinfo.hostname)
m.bindLabel(d.nodeinfo.hostname)
dict[d.nodeinfo.node_id] = m
@ -27,7 +27,7 @@ define(function () {
var line = L.polyline(d.latlngs, opts)
line.bindPopup(d.source.node.nodeinfo.hostname + " " + d.target.node.nodeinfo.hostname + "<br><strong>" + showDistance(d) + " / " + showTq(d) + "</strong>")
line.bindLabel(d.source.node.nodeinfo.hostname + " " + d.target.node.nodeinfo.hostname + "<br><strong>" + showDistance(d) + " / " + showTq(d) + "</strong>")
line.on('click', gotoAnything.link(d, false))
dict[linkId(d)] = line