From bfe436e493006bea75d32383d6bdfc0af8c7e5d0 Mon Sep 17 00:00:00 2001
From: surprise <15810472099@163.com>
Date: 星期四, 19 十月 2023 13:44:19 +0800
Subject: [PATCH] 图层组透明度,临时图层组

---
 src/assets/js/Map/temporaryTools.js |   13 ++++++++-----
 1 files changed, 8 insertions(+), 5 deletions(-)

diff --git a/src/assets/js/Map/temporaryTools.js b/src/assets/js/Map/temporaryTools.js
index 77aaa7f..f8be7c8 100644
--- a/src/assets/js/Map/temporaryTools.js
+++ b/src/assets/js/Map/temporaryTools.js
@@ -37,7 +37,7 @@
             heightReference = Number.POSITIVE_INFINITY;
         }
         var style;
-        if (res.style) {
+        if (res.outline) {
             style = Cesium.LabelStyle.FILL_AND_OUTLINE
         } else {
             style = Cesium.LabelStyle.FILL
@@ -70,7 +70,7 @@
                     res.outlineColor
                 ).withAlpha(res.outlineAlpha),
 
-                outlineWidth: res.outlineWidth,
+                outlineWidth: res.width,
                 scale: res.scale,
                 style: style,
                 horizontalOrigin: Cesium.HorizontalOrigin.CENTER,//瀵归綈鏂瑰紡
@@ -140,20 +140,23 @@
     addTemporaryPolylineLayer(res) {
         var outlinewidth = 0
         if (res.outline) {
-            outlinewidth = res.outlineWidth
+            outlinewidth = res.width
         }
-
+ 
         window.Viewer.entities.add({
             name: res.cnName,
             id: res.id,
             shpType: res.shpType,
+            outline: res.outline,
             polyline: {
+                outline: res.outline,
                 positions: Cesium.Cartesian3.fromDegreesArray(res.geometry),
                 width: res.width,
                 distanceDisplayCondition: new Cesium.DistanceDisplayCondition(
                     res.near,
                     res.far
                 ),
+  
                 material: new Cesium.PolylineOutlineMaterialProperty({
                     color: Cesium.Color.fromCssColorString(res.material).withAlpha(
                         res.materialAlpha
@@ -336,7 +339,7 @@
             layerType: '绾�',
             geometry: geom,
             heightReference: res.polyline.clampToGround._value,
-            outline: res.outline != null ? res.outline : false,
+            outline:  res.outline != null ?  res.outline : false,
             width: res.polyline.width._value,
             material: this.colorRgbToHex('rgb(' + (mataColor.red * 255) + ',' + (mataColor.green * 255) + ',' + (mataColor.blue * 255) + ')'),
             outlineColor: this.colorRgbToHex('rgb(' + (outlineColor.red * 255) + ',' + (outlineColor.green * 255) + ',' + (outlineColor.blue * 255) + ')'),

--
Gitblit v1.9.3