From f36a63952e29a6dcb20c7620cd4fa00c952298ce Mon Sep 17 00:00:00 2001 From: tk Date: Thu, 8 Aug 2024 18:31:42 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E7=B1=BB=20=20=E5=9E=8B=E3=80=91?= =?UTF-8?q?=EF=BC=9Afix=20=E7=A7=BB=E5=8A=A8=E7=9A=84=E7=AB=AF=20=E9=A3=9E?= =?UTF-8?q?=E6=9C=BA=E8=B7=9F=E9=9A=8F=20=E6=8B=96=E6=8B=BD=E5=B1=8F?= =?UTF-8?q?=E5=B9=95=E4=B8=8D=E4=BC=9A=E5=8F=96=E6=B6=88=E8=B7=9F=E9=9A=8F?= =?UTF-8?q?bug=20pc=E7=AB=AF=E6=B2=A1=E6=9C=89=E9=97=AE=E9=A2=98=20?= =?UTF-8?q?=E3=80=90=E5=8E=9F=20=20=E5=9B=A0=E3=80=91=EF=BC=9A=20=E3=80=90?= =?UTF-8?q?=E8=BF=87=20=20=E7=A8=8B=E3=80=91=EF=BC=9A=20=E3=80=90=E5=BD=B1?= =?UTF-8?q?=20=20=E5=93=8D=E3=80=91=EF=BC=9A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/utils/mapboxgl_plugs/index.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/utils/mapboxgl_plugs/index.js b/src/utils/mapboxgl_plugs/index.js index e10947a..1de9233 100644 --- a/src/utils/mapboxgl_plugs/index.js +++ b/src/utils/mapboxgl_plugs/index.js @@ -163,6 +163,11 @@ export class FollowControl { // 监听地图 mousedown 事件 this._map.on('mousedown', this._handleMapMouseDown.bind(this)) + // 监听触摸事件 + this._map.getCanvasContainer().addEventListener('touchstart', this._handleMapMouseDown.bind(this)) + this._map.getCanvasContainer().addEventListener('touchmove', this._handleMapMouseDown.bind(this)) + this._map.getCanvasContainer().addEventListener('touchend', this._handleMapMouseDown.bind(this)) + return this._container }