From 8dc63fb2f82aefc329addd61781ce74a0f8edca3 Mon Sep 17 00:00:00 2001
From: fuchengshen <men883234@gmail.com>
Date: 星期三, 19 十月 2022 16:57:38 +0800
Subject: [PATCH] 上海遮罩层

---
 js/function.js |   20 +++++++++++++++++++-
 1 files changed, 19 insertions(+), 1 deletions(-)

diff --git a/js/function.js b/js/function.js
index 57f8544..ac40d8e 100644
--- a/js/function.js
+++ b/js/function.js
@@ -232,7 +232,25 @@
 
 function mask_selection(regionCode){
     if(regionCode == 0){
-      return
+		geoJsonLayer = new mars3d.layer.GeoJsonLayer({
+		  url: "data/shanghai.json",
+		  mask: true, //鏍囪瘑涓洪伄缃╁眰銆愰噸鐐瑰弬鏁般��
+		  symbol: {
+		    styleOptions: {
+		      fill: true,
+		      color: "rgb(2,26,79)",
+		      outline: true,
+		      outlineColor: "#39E09B",
+		      outlineWidth: 8,
+		      outlineOpacity: 0.8,
+		      arcType: Cesium.ArcType.GEODESIC,
+		      clampToGround: true,
+		    },
+		  },
+		  zIndex: 99999999999,
+		});
+		map.addLayer(geoJsonLayer);
+      // return
     }
     //geojson 鍚勮鏀垮尯杈圭晫绾�
       geoJsonLayer = new mars3d.layer.GeoJsonLayer({

--
Gitblit v1.9.1