From 4c43142b0353f13d8fadbdbbcfdf60527c1fba60 Mon Sep 17 00:00:00 2001 From: Markus Tacker Date: Tue, 27 Feb 2024 23:04:34 +0100 Subject: [PATCH] fix(map): pass options, disable rotate --- src/component/KnownObjects/Location.tsx | 1 - src/map/createMap.ts | 3 +++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/component/KnownObjects/Location.tsx b/src/component/KnownObjects/Location.tsx index e456480..da4d1b0 100644 --- a/src/component/KnownObjects/Location.tsx +++ b/src/component/KnownObjects/Location.tsx @@ -50,7 +50,6 @@ export const Card = (props: { locations: Geolocation_14201[] }) => { { lat, lng }, { zoom: 8, attributionControl: false }, ) - map.dragRotate.disable() map.scrollZoom.disable() map.dragPan.disable() diff --git a/src/map/createMap.ts b/src/map/createMap.ts index d9c1244..e1ac502 100644 --- a/src/map/createMap.ts +++ b/src/map/createMap.ts @@ -26,7 +26,10 @@ export const createMap = ( parameters.mapRegion, ), zoom: options?.zoom ?? 4, + ...options, }) + map.dragRotate.disable() + map.touchZoomRotate.disable() return map }