update node outline to be based on position precision
This commit is contained in:
@ -3169,15 +3169,23 @@
|
|||||||
clearNodeOutline();
|
clearNodeOutline();
|
||||||
|
|
||||||
// find node marker by id
|
// find node marker by id
|
||||||
var nodeMarker = nodeMarkers[id];
|
const nodeMarker = nodeMarkers[id];
|
||||||
if(!nodeMarker){
|
if(!nodeMarker){
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// add circle around node
|
// find node by id
|
||||||
selectedNodeOutlineCircle = L.circle(nodeMarker.getLatLng(), {
|
const node = findNodeById(id);
|
||||||
radius: 1200, // 1.2km
|
if(!node){
|
||||||
}).addTo(map);
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// add position precision circle around node
|
||||||
|
if(node.position_precision != null && node.position_precision > 0 && node.position_precision < 32){
|
||||||
|
selectedNodeOutlineCircle = L.circle(nodeMarker.getLatLng(), {
|
||||||
|
radius: getPositionPrecisionInMeters(node.position_precision),
|
||||||
|
}).addTo(map);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -3552,7 +3560,7 @@
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
// show node info sidebar when clicking node marker
|
// show node info tooltip when clicking node marker
|
||||||
marker.on("click", function(event) {
|
marker.on("click", function(event) {
|
||||||
|
|
||||||
// close all other popups and tooltips
|
// close all other popups and tooltips
|
||||||
@ -3565,6 +3573,9 @@
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// show position precision outline
|
||||||
|
showNodeOutline(node.node_id);
|
||||||
|
|
||||||
// open tooltip for node
|
// open tooltip for node
|
||||||
map.openTooltip(getTooltipContentForNode(node), event.target.getLatLng(), {
|
map.openTooltip(getTooltipContentForNode(node), event.target.getLatLng(), {
|
||||||
interactive: true, // allow clicking buttons inside tooltip
|
interactive: true, // allow clicking buttons inside tooltip
|
||||||
|
Reference in New Issue
Block a user