diff --git a/js/index.js b/js/index.js index a00a8f2..21cb21e 100644 --- a/js/index.js +++ b/js/index.js @@ -389,6 +389,7 @@ function focusEntity(entityInfo) { document.getElementById("nameplate").style.display = focusedEntityInfo ? 'flex' : 'none'; reloadFocusAreaIfNeeded(); + updateMapForSelection(); } function selectEntity(entityInfo) { diff --git a/js/mapController.js b/js/mapController.js index c0cf3ec..6cb249a 100644 --- a/js/mapController.js +++ b/js/mapController.js @@ -1478,7 +1478,9 @@ function updateMapForSelection() { let id = selectedEntityInfo && selectedEntityInfo.id; let type = selectedEntityInfo && selectedEntityInfo.type; - let idsToHighlight = [id ? id : -1]; + let focusedId = focusedEntityInfo?.id; + + let idsToHighlight = [id && id !== focusedId ? id : -1]; if (type === "relation") { let members = osmEntityCache[type[0] + id]?.members || [];