diff --git a/src/core/mapHelper.js b/src/core/mapHelper.js index 643f67f..cc0c635 100644 --- a/src/core/mapHelper.js +++ b/src/core/mapHelper.js @@ -22,14 +22,16 @@ class MapHelper { this._map.easeTo({ pitch: 45, bearing: 0, duration: 0 }) this._map.dragRotate.enable() this._map.touchZoomRotate.enableRotation() - if (this._map.dragPitch) this._map.dragPitch.enable() + this._map.dragRotate.enablePitch?.() + this._map.touchPitch?.enable?.() } if (is2D) { this._map.easeTo({ pitch: 0, bearing: 0, duration: 0 }) this._map.dragRotate.disable() this._map.touchZoomRotate.disableRotation() - if (this._map.dragPitch) this._map.dragPitch.disable() + this._map.dragRotate.disablePitch?.() + this._map.touchPitch?.disable?.() } }