console.logs entfernt
This commit is contained in:
@@ -24,14 +24,10 @@ const Map = () => {
|
||||
}, [map, setMap]);
|
||||
|
||||
useEffect(() => {
|
||||
console.log("Map center or zoom changed");
|
||||
|
||||
if (ref.current) {
|
||||
const center = ref.current?.getCenter();
|
||||
const zoom = ref.current?.getZoom();
|
||||
console.log("Map center or zoom changed", center.equals(map.center), zoom === map.zoom);
|
||||
if (!center.equals(map.center) || zoom !== map.zoom) {
|
||||
console.log("Updating map center and zoom");
|
||||
ref.current.setView(map.center, map.zoom);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user