diff --git a/src/components/map/MapComponent.vue b/src/components/map/MapComponent.vue index f535d2bf8..565a99feb 100644 --- a/src/components/map/MapComponent.vue +++ b/src/components/map/MapComponent.vue @@ -7,6 +7,11 @@ :scroll-zoom="true" :transform-request="transformRequest" :mapStyle="baseLayerStyle" + :doubleClickZoom="false" + :pitchWithRotate="false" + :dragRotate="false" + :touchZoomRotate="false" + :touchPitch="false" > diff --git a/src/components/wms/AnimatedRasterLayer.vue b/src/components/wms/AnimatedRasterLayer.vue index 1399f54cf..094da61c8 100644 --- a/src/components/wms/AnimatedRasterLayer.vue +++ b/src/components/wms/AnimatedRasterLayer.vue @@ -82,19 +82,14 @@ function onDoubleClick(event: MapLayerMouseEvent | MapLayerTouchEvent): void { } function addHooksToMapObject() { - map?.once('load', () => { - onLayerChange() - - map.dragRotate.disable() - map.touchZoomRotate.disableRotation() - map.doubleClickZoom.disable() - }) + map?.on('load', onLayerChange) map?.on('moveend', onMapMove) map?.on('sourcedata', onDataChange) map?.on('dblclick', onDoubleClick) } function removeHooksFromMapObject(): void { + map?.off('load', onLayerChange) map?.off('moveend', onMapMove) map?.off('sourcedata', onDataChange) map?.off('dblclick', onDoubleClick)