When search markers are visible, clear search on map click

This commit is contained in:
2026-06-30 18:32:23 +02:00
parent 59e334c499
commit 7f1c4b5f61
2 changed files with 8 additions and 7 deletions
+6
View File
@@ -1191,6 +1191,12 @@ export default class MapComponent extends Component {
return;
}
if (this.mapUi.searchResults && this.mapUi.searchResults.length > 0) {
console.debug('Clearing active search and markers on map click');
this.router.transitionTo('index');
return;
}
// Require Zoom >= 17 for generic map searches
// This prevents accidental searches when interacting with the map at a high level
const currentZoom = this.mapInstance.getView().getZoom();