[TASK] Adjust marker style - focus on online nodes
This commit is contained in:
parent
26368ca337
commit
989d9480d1
16
lib/map.js
16
lib/map.js
@ -160,8 +160,8 @@ define(["map/clientlayer", "map/labelslayer",
|
||||
|
||||
var iconOnline = {color: "#1566A9", fillColor: "#1566A9", radius: 6, fillOpacity: 0.5, opacity: 0.5, weight: 2, className: "stroke-first"};
|
||||
var iconOffline = {color: "#D43E2A", fillColor: "#D43E2A", radius: 3, fillOpacity: 0.5, opacity: 0.5, weight: 1, className: "stroke-first"};
|
||||
var iconLost = {color: "#D43E2A", fillColor: "#D43E2A", radius: 6, fillOpacity: 0.8, opacity: 0.8, weight: 1, className: "stroke-first"};
|
||||
var iconAlert = {color: "#D43E2A", fillColor: "#D43E2A", radius: 6, fillOpacity: 0.8, opacity: 0.8, weight: 2, className: "stroke-first node-alert"};
|
||||
var iconLost = {color: "#D43E2A", fillColor: "#D43E2A", radius: 4, fillOpacity: 0.8, opacity: 0.8, weight: 1, className: "stroke-first"};
|
||||
var iconAlert = {color: "#D43E2A", fillColor: "#D43E2A", radius: 5, fillOpacity: 0.8, opacity: 0.8, weight: 2, className: "stroke-first"};
|
||||
var iconNew = {color: "#1566A9", fillColor: "#93E929", radius: 6, fillOpacity: 1.0, opacity: 0.5, weight: 2};
|
||||
|
||||
return function (config, linkScale, sidebar, router, buttons) {
|
||||
@ -299,14 +299,12 @@ define(["map/clientlayer", "map/labelslayer",
|
||||
};
|
||||
});
|
||||
|
||||
|
||||
layers[0].layer.addTo(map);
|
||||
|
||||
layers.forEach(function (d) {
|
||||
baseLayers[d.name] = d.layer;
|
||||
});
|
||||
|
||||
|
||||
map.on("locationfound", locationFound);
|
||||
map.on("locationerror", locationError);
|
||||
map.on("dragend", saveView);
|
||||
@ -352,7 +350,9 @@ define(["map/clientlayer", "map/labelslayer",
|
||||
map.options.maxZoom = e.layer.options.maxZoom;
|
||||
clientLayer.options.maxZoom = map.options.maxZoom;
|
||||
labelsLayer.options.maxZoom = map.options.maxZoom;
|
||||
if (map.getZoom() > map.options.maxZoom) map.setZoom(map.options.maxZoom);
|
||||
if (map.getZoom() > map.options.maxZoom) {
|
||||
map.setZoom(map.options.maxZoom);
|
||||
}
|
||||
if (localStorageTest()) {
|
||||
localStorage.setItem("map/selectedLayer", JSON.stringify({name: e.name}));
|
||||
}
|
||||
@ -411,7 +411,7 @@ define(["map/clientlayer", "map/labelslayer",
|
||||
m = linkDict[highlight.o.id];
|
||||
|
||||
if (m) {
|
||||
m.setStyle({weight: 7, opacity: 1, dashArray: "10, 10"});
|
||||
m.setStyle({weight: 4, opacity: 1, dashArray: "5, 10"});
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -528,12 +528,14 @@ define(["map/clientlayer", "map/labelslayer",
|
||||
return iconAlert;
|
||||
}
|
||||
|
||||
if (d.lastseen.isAfter(moment(data.now).subtract(14, "days"))) {
|
||||
return iconLost;
|
||||
}
|
||||
}, router));
|
||||
|
||||
groupOffline = L.featureGroup(markersOffline).addTo(map);
|
||||
groupOnline = L.featureGroup(markersOnline).addTo(map);
|
||||
groupLost = L.featureGroup(markersLost).addTo(map);
|
||||
groupOnline = L.featureGroup(markersOnline).addTo(map);
|
||||
groupNew = L.featureGroup(markersNew).addTo(map);
|
||||
|
||||
var rtreeOnlineAll = rbush(9);
|
||||
|
Loading…
Reference in New Issue
Block a user