From e14dcf15dc454971533a3828fa265f8423d6e1c9 Mon Sep 17 00:00:00 2001 From: wangyanjun Date: Tue, 26 Dec 2023 18:34:22 +0800 Subject: [PATCH] =?UTF-8?q?[map-sdk]=E5=9C=B0=E5=9B=BE=E9=BB=98=E8=AE=A4?= =?UTF-8?q?=E4=B8=8D=E5=8F=AF=E4=BB=A5=E7=BC=A9=E6=94=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/autonavi/nge/map/MapView.kt | 6 +++--- .../zhidaoauto/map/sdk/inner/road/RoadHelper.kt | 16 +++++++++------- 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/libraries/mapmodule/src/main/java/com/autonavi/nge/map/MapView.kt b/libraries/mapmodule/src/main/java/com/autonavi/nge/map/MapView.kt index c162267d53..33c328990b 100644 --- a/libraries/mapmodule/src/main/java/com/autonavi/nge/map/MapView.kt +++ b/libraries/mapmodule/src/main/java/com/autonavi/nge/map/MapView.kt @@ -1083,13 +1083,13 @@ class MapView(context: Context, private val mMapStyleParams: IMapStyleParams, pr private var isScroll = true //可以斜滑 - private var isFling = true + private var isFling = false //可以旋转 - private var isRotate = true + private var isRotate = false //可以缩放 - private var isCanZoom = true + private var isCanZoom = false private var isVr = true diff --git a/libraries/mapmodule/src/main/java/com/zhidaoauto/map/sdk/inner/road/RoadHelper.kt b/libraries/mapmodule/src/main/java/com/zhidaoauto/map/sdk/inner/road/RoadHelper.kt index 3fe85ab91f..2ea1d605f5 100644 --- a/libraries/mapmodule/src/main/java/com/zhidaoauto/map/sdk/inner/road/RoadHelper.kt +++ b/libraries/mapmodule/src/main/java/com/zhidaoauto/map/sdk/inner/road/RoadHelper.kt @@ -517,13 +517,15 @@ class RoadHelper private constructor() { roadRectInfos.angle = buf.long / 1e8 val rectList = ArrayList() val size = buf.int - for (i in 0 until size step 8) { - val rect = RoadRect() - rect.topLeft = LonLatPoint(buf.long / 1e8, buf.long / 1e8) - rect.topRight = LonLatPoint(buf.long / 1e8, buf.long / 1e8) - rect.bottomLeft = LonLatPoint(buf.long / 1e8, buf.long / 1e8) - rect.bottomRight = LonLatPoint(buf.long / 1e8, buf.long / 1e8) - rectList.add(rect) + if(size > 0 && size % 8 == 0) { + for (i in 0 until size step 8) { + val rect = RoadRect() + rect.topLeft = LonLatPoint(buf.long / 1e8, buf.long / 1e8) + rect.topRight = LonLatPoint(buf.long / 1e8, buf.long / 1e8) + rect.bottomLeft = LonLatPoint(buf.long / 1e8, buf.long / 1e8) + rect.bottomRight = LonLatPoint(buf.long / 1e8, buf.long / 1e8) + rectList.add(rect) + } } roadRectInfos.roadRects = rectList if (CompileConfig.DEBUG) {