From ab663303cf980d26b436bd16ce379c0ce0ad9d4d Mon Sep 17 00:00:00 2001
From: wangrong <wangrong@shsening.com>
Date: 星期一, 24 十月 2022 01:06:26 +0800
Subject: [PATCH] 添加权限
---
js/function.js | 44 +++++++++++++++++++++++++++++++++++++++++++-
1 files changed, 43 insertions(+), 1 deletions(-)
diff --git a/js/function.js b/js/function.js
index 108fbfa..06ad5a1 100644
--- a/js/function.js
+++ b/js/function.js
@@ -232,8 +232,47 @@
function mask_selection(regionCode){
if(regionCode == 0){
- return
+ geoJsonLayer = new mars3d.layer.GeoJsonLayer({
+ id:9999,
+ url: "./data/shanghai.json",
+ mask: true, //鏍囪瘑涓洪伄缃╁眰銆愰噸鐐瑰弬鏁般��
+ symbol: {
+ styleOptions: {
+ fill: true,
+ color: "rgb(2,26,79)",
+ outline: true,
+ outlineColor: "#39E09B",
+ outlineWidth: 3,
+ outlineOpacity: 0.8,
+ arcType: Cesium.ArcType.GEODESIC,
+ clampToGround: true,
+ },
+ }
+ });
+ map.addLayer(geoJsonLayer);
+ // return
+ }else{
+ //geojson 鍚勮鏀垮尯杈圭晫绾�
+ geoJsonLayer = new mars3d.layer.GeoJsonLayer({
+ id:9999,
+ url: "./data/"+regionCode+".geojson",
+ mask: true, //鏍囪瘑涓洪伄缃╁眰銆愰噸鐐瑰弬鏁般��
+ symbol: {
+ styleOptions: {
+ fill: true,
+ color: "rgb(2,26,79)",
+ outline: true,
+ outlineColor: "#39E09B",
+ outlineWidth: 3,
+ outlineOpacity: 0.5,
+ arcType: Cesium.ArcType.GEODESIC,
+ clampToGround: true,
+ },
+ },
+});
+map.addLayer(geoJsonLayer);
}
+<<<<<<< HEAD
debugger;
//geojson 鍚勮鏀垮尯杈圭晫绾�
geoJsonLayer = new mars3d.layer.GeoJsonLayer({
@@ -253,5 +292,8 @@
},
});
map.addLayer(geoJsonLayer);
+=======
+
+>>>>>>> 165c834d414f2c5f56ad6d259b5f18c26921cc94
}
--
Gitblit v1.9.1