fix: Bereich ausgewählt dann könnte nicht mit der Maus die Kartenansicht verschieben
This commit is contained in:
@@ -1,10 +1,9 @@
|
||||
// utils/zoomAndCenterUtils.js
|
||||
export const zoomIn = (e, map) => {
|
||||
if (!map) {
|
||||
console.error("map is not defined in zoomIn");
|
||||
return;
|
||||
}
|
||||
map.flyTo(e.latlng, 12);
|
||||
map.flyTo(e.latlng, map.getZoom() + 1);
|
||||
localStorage.setItem("mapZoom", map.getZoom());
|
||||
localStorage.setItem("mapCenter", JSON.stringify(map.getCenter()));
|
||||
};
|
||||
@@ -28,4 +27,6 @@ export const centerHere = (e, map) => {
|
||||
return;
|
||||
}
|
||||
map.panTo(e.latlng);
|
||||
localStorage.setItem("mapZoom", map.getZoom());
|
||||
localStorage.setItem("mapCenter", JSON.stringify(map.getCenter()));
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user