From cdb79efec636e296ca0238b5682cf15efdc7a3c1 Mon Sep 17 00:00:00 2001 From: xiaosi <2652281683@qq.com> Date: Thu, 27 Aug 2026 11:33:40 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20mapHelper=20=E7=94=A8=20Mapbox=20pitch?= =?UTF-8?q?=20API=20=E6=9B=BF=E4=BB=A3=E4=B8=8D=E5=AD=98=E5=9C=A8=E7=9A=84?= =?UTF-8?q?=20dragPitch?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/core/mapHelper.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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?.() } }