From 26156c8fb646998c87be464735c0df8ea26c836c Mon Sep 17 00:00:00 2001
From: lc <lc@qq.com>
Date: 星期二, 05 七月 2022 15:36:01 +0800
Subject: [PATCH] 添加聊城遮罩层
---
js/index.js | 42 ++++++++++++++++++++++++++++++++++++++++++
1 files changed, 42 insertions(+), 0 deletions(-)
diff --git a/js/index.js b/js/index.js
index 69237c6..048eb90 100644
--- a/js/index.js
+++ b/js/index.js
@@ -72,6 +72,31 @@
//鏋勫缓鍦板浘
initMap(data.map3d);
+
+// 鑱婂煄杈圭晫
+const maskLayer = new mars3d.layer.GeoJsonLayer({
+ id: 300,
+ url: "../data/liaocheng.geojson",
+ mask: true,
+ zIndex:100,
+ symbol: {
+ styleOptions: {
+ fill: true,
+ color: "#111111",
+ opacity: 0.9,
+ outline: false,
+ outlineColor: "#39E09B",
+ outlineWidth: 8,
+ outlineOpacity: 0.8,
+ arcType: Cesium.ArcType.GEODESIC,
+ clampToGround: true,
+ },
+ },
+ show: true,
+ flyTo: false
+});
+
+map.addLayer(maskLayer);
setTimeout(removeMask, 3000); //娆㈣繋UI鍏抽棴澶勭悊
},
error: function (request, textStatus) {
@@ -83,8 +108,25 @@
});
initUI();
+
+
+
+
+// const graphicLayer = new mars3d.layer.GraphicLayer()
+// map.addLayer(graphicLayer)
+
+
+
+
+
+
});
+
+
+
+
+
function removeMask() {
$("#mask").remove();
}
--
Gitblit v1.9.1