|
|
|
@ -80,13 +80,14 @@ function leafletMap() {
|
|
|
|
|
//console.log(iconName);
|
|
|
|
|
|
|
|
|
|
var classes = "package-marker package-marker-leaflet";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Prevent selection highlight from going away after map refresh
|
|
|
|
|
if (map.openedPanelIconID != null && map.openedPanelIconID == datai.id) {
|
|
|
|
|
classes += " selected";
|
|
|
|
|
}
|
|
|
|
|
// Show different color highlight when nearby
|
|
|
|
|
if (packages[i].distance * 1 < getStorage("alertradius") * 1) {
|
|
|
|
|
// Show different color highlight when nearby and undelivered
|
|
|
|
|
if (packages[i].distance * 1 < getStorage("alertradius") * 1
|
|
|
|
|
&& getUndeliveredCount(packages[i]) > 0) {
|
|
|
|
|
classes += " alerted";
|
|
|
|
|
}
|
|
|
|
|
var icon = L.icon({
|
|
|
|
|