From 5154221658f586cd62e9e5c9ddbe400bfa32f2fa Mon Sep 17 00:00:00 2001
From: qinbo <qinbo@shsening.com>
Date: 星期一, 27 十二月 2021 12:31:55 +0800
Subject: [PATCH] 遮罩 bug fix

---
 js/function.js |   17 +++++++----------
 1 files changed, 7 insertions(+), 10 deletions(-)

diff --git a/js/function.js b/js/function.js
index 5424962..4e65edd 100644
--- a/js/function.js
+++ b/js/function.js
@@ -183,30 +183,27 @@
   }
 }
 
-function mask_selection(userid){
-
+function mask_selection(regionCode){
+    if(regionCode == 0){
+      return
+    }
     //geojson 鍚勮鏀垮尯杈圭晫绾�
-    if(userid != null || userid != undefined){
       geoJsonLayer = new mars3d.layer.GeoJsonLayer({
-        url: "./data/"+userid+".geojson",
+        url: "./data/"+regionCode+".geojson",
         mask: true, //鏍囪瘑涓洪伄缃╁眰銆愰噸鐐瑰弬鏁般��
         symbol: {
           styleOptions: {
             fill: true,
             color: "rgb(2,26,79)",
-            opacity: 0.9,
             outline: true,
             outlineColor: "#39E09B",
-            outlineWidth: 8,
-            outlineOpacity: 0.8,
+            outlineWidth: 3,
+            outlineOpacity: 0.5,
             arcType: Cesium.ArcType.GEODESIC,
             clampToGround: true,
           },
         },
       });
       map.addLayer(geoJsonLayer);
-    }else{
-      return
-    }
 }
 

--
Gitblit v1.9.1