This commit is contained in:
vcoppe
2024-05-23 12:57:24 +02:00
parent 51495e9bd1
commit 8b5d1f1fbf
7 changed files with 67 additions and 39 deletions

View File

@@ -71,6 +71,11 @@ targetMapBounds.subscribe((bounds) => {
return;
}
let currentBounds = get(map)?.getBounds();
if (currentBounds && currentBounds.contains(bounds.bounds.getSouthEast()) && currentBounds.contains(bounds.bounds.getNorthWest())) {
return;
}
get(map)?.fitBounds(bounds.bounds, {
padding: 80,
linear: true,