fix: Reinzoomen, Rauszoom und CenterHere in Contextmenu
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
// utils/zoomAndCenterUtils.js
|
||||
export const zoomIn = (e, map) => {
|
||||
if (!map) {
|
||||
console.error("map is not defined in zoomIn");
|
||||
@@ -16,6 +17,8 @@ export const zoomOut = (map) => {
|
||||
const x = 51.41321407879154;
|
||||
const y = 7.739617925303934;
|
||||
const zoom = 7;
|
||||
console.log("map");
|
||||
console.log(map);
|
||||
map.flyTo([x, y], zoom);
|
||||
localStorage.setItem("mapZoom", map.getZoom());
|
||||
localStorage.setItem("mapCenter", JSON.stringify(map.getCenter()));
|
||||
|
||||
Reference in New Issue
Block a user