|
@@ -224,13 +224,17 @@ define(["map/clientlayer", "map/labelslayer",
|
|
|
layers.forEach(addLayer)
|
|
|
}
|
|
|
|
|
|
- var clientLayer = new ClientLayer()
|
|
|
- clientLayer.addTo(map)
|
|
|
- clientLayer.setZIndex(5)
|
|
|
+ if (config.mapShowClients) {
|
|
|
+ var clientLayer = new ClientLayer()
|
|
|
+ clientLayer.addTo(map)
|
|
|
+ clientLayer.setZIndex(5)
|
|
|
+ }
|
|
|
|
|
|
- var labelsLayer = new LabelsLayer()
|
|
|
- labelsLayer.addTo(map)
|
|
|
- labelsLayer.setZIndex(6)
|
|
|
+ if (config.mapShowLabels) {
|
|
|
+ var labelsLayer = new LabelsLayer()
|
|
|
+ labelsLayer.addTo(map)
|
|
|
+ labelsLayer.setZIndex(6)
|
|
|
+ }
|
|
|
|
|
|
var nodeDict = {}
|
|
|
var linkDict = {}
|
|
@@ -370,9 +374,11 @@ define(["map/clientlayer", "map/labelslayer",
|
|
|
var rtreeOnlineAll = rbush(9)
|
|
|
|
|
|
rtreeOnlineAll.load(data.nodes.all.filter(online).filter(has_location).map(mapRTree))
|
|
|
+ if (config.mapShowClients)
|
|
|
+ clientLayer.setData(rtreeOnlineAll)
|
|
|
|
|
|
- clientLayer.setData(rtreeOnlineAll)
|
|
|
- labelsLayer.setData({online: nodesOnline.filter(has_location),
|
|
|
+ if (config.mapShowLabels)
|
|
|
+ labelsLayer.setData({online: nodesOnline.filter(has_location),
|
|
|
offline: nodesOffline.filter(has_location),
|
|
|
new: data.nodes.new.filter(has_location),
|
|
|
lost: data.nodes.lost.filter(has_location)
|