feat: Reinzoomen auf 12 wie in aspx

This commit is contained in:
ISA
2024-07-18 07:34:38 +02:00
parent 71b25d9a4d
commit 5b380b7c8f
2 changed files with 11 additions and 1036 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -1,5 +1,5 @@
// utils/zoomAndCenterUtils.js
export const zoomIn = (e, map) => {
/* export const zoomIn = (e, map) => {
if (!map) {
console.error("map is not defined in zoomIn");
return;
@@ -7,6 +7,16 @@ export const zoomIn = (e, map) => {
map.flyTo(e.latlng, map.getZoom() + 1);
localStorage.setItem("mapZoom", map.getZoom());
localStorage.setItem("mapCenter", JSON.stringify(map.getCenter()));
}; */
export const zoomIn = (e, map) => {
if (!map) {
console.error("map is not defined in zoomIn");
return;
}
map.flyTo(e.latlng, 12);
localStorage.setItem("mapZoom", map.getZoom());
localStorage.setItem("mapCenter", JSON.stringify(map.getCenter()));
};
export const zoomOut = (map) => {