From c7a16ca1b6fbcb0b82a4a09c2e75014624082e37 Mon Sep 17 00:00:00 2001
From: Riku <risaku@163.com>
Date: 星期四, 27 三月 2025 22:45:48 +0800
Subject: [PATCH] 修复走航融合功能bug
---
src/utils/map/3dLayer.js | 19 ++++++++++++-------
1 files changed, 12 insertions(+), 7 deletions(-)
diff --git a/src/utils/map/3dLayer.js b/src/utils/map/3dLayer.js
index 72d0e14..01ff1d2 100644
--- a/src/utils/map/3dLayer.js
+++ b/src/utils/map/3dLayer.js
@@ -96,7 +96,8 @@
const coors = fDatas.coors_GD;
const heights = factor.heights;
const colors = factor.colors;
- const bColor = factor.bottomColor;
+ // const bColor = factor.bottomColor;
+ const bColors = factor.bottomColors;
// eslint-disable-next-line no-undef
var cylinder = new AMap.Object3D.Mesh();
@@ -133,10 +134,8 @@
}
}
- // var bColor = bColor
- var tColor = colors[i];
- geometry.vertexColors.push.apply(geometry.vertexColors, bColor); //搴曢儴椤剁偣棰滆壊
- geometry.vertexColors.push.apply(geometry.vertexColors, tColor); //椤堕儴椤剁偣棰滆壊
+ geometry.vertexColors.push.apply(geometry.vertexColors, bColors[i]); //搴曢儴椤剁偣棰滆壊
+ geometry.vertexColors.push.apply(geometry.vertexColors, colors[i]); //椤堕儴椤剁偣棰滆壊
}
// 7.鏍规嵁鍚堝苟閫夐」閲嶇疆鎴栨柊澧炲綋鍓嶇紦瀛樻暟鎹�
@@ -168,15 +167,21 @@
}
export default {
+ clear() {
+ map.off('zoomend', onMapZoom);
+ if (_cylinder != undefined) {
+ object3Dlayer.remove(_cylinder);
+ }
+ },
+
drawMesh: drawMesh,
/**
* 缁樺埗3D璧拌璺嚎鍥�
* @param fDatas 瀹屾暣鐩戞祴鏁版嵁
* @param factor 褰撳墠灞曠ず鐨勭洃娴嬪洜瀛愬璞�
* @param merge 鏄惁鍜屼箣鍓嶇粯鍒剁殑鍥惧舰鍚堝苟
- * @param setCenter 闀滃ご鏄惁鑷姩绉诲姩鑷冲浘褰腑蹇�
*/
- drawRoadMap(fDatas, factor, merge, setCenter) {
+ drawRoadMap(fDatas, factor, merge) {
const lnglats_GD = fDatas.lnglats_GD;
const heights = factor.heights;
--
Gitblit v1.9.3