mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Allow to add links between couples of lat,long or x,y coordinates
This commit is contained in:
@ -365,8 +365,17 @@
|
|||||||
for (var id in options.links) {
|
for (var id in options.links) {
|
||||||
elemOptions = $.fn.mapael.getElemOptions(options.map.defaultLink, options.links[id], {});
|
elemOptions = $.fn.mapael.getElemOptions(options.map.defaultLink, options.links[id], {});
|
||||||
|
|
||||||
p1 = options.plots[options.links[id].between[0]];
|
if (typeof options.links[id].between[0] == 'string') {
|
||||||
p2 = options.plots[options.links[id].between[1]];
|
p1 = options.plots[options.links[id].between[0]];
|
||||||
|
} else {
|
||||||
|
p1 = options.links[id].between[0];
|
||||||
|
}
|
||||||
|
|
||||||
|
if (typeof options.links[id].between[1] == 'string') {
|
||||||
|
p2 = options.plots[options.links[id].between[1]];
|
||||||
|
} else {
|
||||||
|
p2 = options.links[id].between[1];
|
||||||
|
}
|
||||||
|
|
||||||
if (typeof p1.latitude != "undefined" && typeof p1.longitude != "undefined") {
|
if (typeof p1.latitude != "undefined" && typeof p1.longitude != "undefined") {
|
||||||
coordsP1 = getCoords(p1.latitude, p1.longitude);
|
coordsP1 = getCoords(p1.latitude, p1.longitude);
|
||||||
|
Reference in New Issue
Block a user