From 5b14c0f3e3bbbd992a87fb6d0a49baee17659cc6 Mon Sep 17 00:00:00 2001
From: liuyg <376836862@qq.com>
Date: Mon, 10 Jan 2022 11:51:12 +0800
Subject: [PATCH] +不每次都移动到起点
---
src/store/modules/mobile.js | 18 ++++++++++++++++--
1 files changed, 16 insertions(+), 2 deletions(-)
diff --git a/src/store/modules/mobile.js b/src/store/modules/mobile.js
index ed61810..cfb83ed 100644
--- a/src/store/modules/mobile.js
+++ b/src/store/modules/mobile.js
@@ -720,18 +720,32 @@
MSET_DRAWALINELAYER({ state, commit, dispatch }, Str) {
//检查是否存在路线
commit("removePolyline");
+ // let color = global.DC.Color.RED;
+ // let color = global.DC.Namespace.Cesium.Color.DEEPSKYBLUE;
+ let color =
+ global.DC.Namespace.Cesium.Color.fromCssColorString("#409EFF");
+ // let color = {
+ // alpha: 1,
+ // blue: 0,
+ // green: 0,
+ // red: 1,
+ // };
+ // color.blue = 0.25;
+ // color.green = 0.61;
+ // color.red = 1;
+ // console.log(color);
let drawALineLayer = new global.DC.VectorLayer("layer");
state.mviewer.addLayer(drawALineLayer);
let polyline = new global.DC.Polyline(Str); //加入绘画点
polyline.setStyle({
width: 3,
- material: DC.Color.RED,
+ material: color,
clampToGround: true,
});
drawALineLayer.addOverlay(polyline);
state.drawALineLayer = drawALineLayer;
state.isOpenDrawALine = true;
- commit("cameraSetView", state.navigationStartLngLat); //移动
+ // commit("cameraSetView", state.navigationStartLngLat); //移动
},
},
};
--
Gitblit v1.9.3