From 26156c8fb646998c87be464735c0df8ea26c836c Mon Sep 17 00:00:00 2001
From: lc <lc@qq.com>
Date: 星期二, 05 七月 2022 15:36:01 +0800
Subject: [PATCH] 添加聊城遮罩层
---
gltf/BS.gltf | 0
widgetsTS/widget_detail/view.js | 1
js/function_1001.js | 78 +++++++++++++-------------
index.html | 2
widgetsTS/widget_grid/webworker.js | 4 +
js/index.js | 42 ++++++++++++++
6 files changed, 87 insertions(+), 40 deletions(-)
diff --git a/gltf/TXFFFF00.gltf b/gltf/BS.gltf
similarity index 100%
rename from gltf/TXFFFF00.gltf
rename to gltf/BS.gltf
diff --git a/index.html b/index.html
index 689b2b5..93b4908 100644
--- a/index.html
+++ b/index.html
@@ -1,7 +1,7 @@
锘�<!DOCTYPE html>
<html class="no-js css-menubar" lang="zh-cn">
<head>
- <title>鑱婂煄甯傚競閬撹矾浜ら�氱幆澧冪洃娴嬪钩鍙�</title>
+ <title>鑱婂煄甯傞亾璺氦閫氱幆澧冪洃娴嬪钩鍙�</title>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
<!-- 绉诲姩璁惧 viewport -->
diff --git a/js/function_1001.js b/js/function_1001.js
index 54f3705..0e402a3 100644
--- a/js/function_1001.js
+++ b/js/function_1001.js
@@ -5,48 +5,48 @@
// for change color locally.
var data_list_1001;
-const graphicLayer = new this.mars3d.layer.GraphicLayer()
- map.addLayer(graphicLayer)
+// const graphicLayer = new this.mars3d.layer.GraphicLayer()
+// map.addLayer(graphicLayer)
-// 鑱婂煄杈圭晫
-const maskLayer = new this.mars3d.layer.GeoJsonLayer({
- id: 300,
- url: "/data/liaocheng.geojson",
- mask: true,
- 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
-});
-// 杈圭晫澧�
-const graphic = new this.mars3d.graphic.WallEntity({
- positions: this.liaocheng_boundary,
- style: {
- diffHeight: 1500,
- material: this.mars3d.MaterialUtil.createMaterialProperty(this.mars3d.MaterialType.LineFlow, {
- image: "img/textures/fence.png",
- color: "#bdf700",
- repeat: new Cesium.Cartesian2(5, 1),
- axisY: true, // 鏂瑰悜锛宼rue鏃朵笂涓嬶紝false宸﹀彸
- speed: 15
- })
- }
-})
-graphicLayer.addGraphic(graphic)
+// // 鑱婂煄杈圭晫
+// const maskLayer = new this.mars3d.layer.GeoJsonLayer({
+// id: 300,
+// url: "/data/liaocheng.geojson",
+// mask: true,
+// 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
+// });
+// // 杈圭晫澧�
+// const graphic = new this.mars3d.graphic.WallEntity({
+// positions: this.liaocheng_boundary,
+// style: {
+// diffHeight: 1500,
+// material: this.mars3d.MaterialUtil.createMaterialProperty(this.mars3d.MaterialType.LineFlow, {
+// image: "img/textures/fence.png",
+// color: "#bdf700",
+// repeat: new Cesium.Cartesian2(5, 1),
+// axisY: true, // 鏂瑰悜锛宼rue鏃朵笂涓嬶紝false宸﹀彸
+// speed: 15
+// })
+// }
+// })
+// graphicLayer.addGraphic(graphic)
-map.addLayer(maskLayer);
+// map.addLayer(maskLayer);
function addWMSLayer(item) {
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();
}
diff --git a/widgetsTS/widget_detail/view.js b/widgetsTS/widget_detail/view.js
index ffac05a..d2ce7cc 100644
--- a/widgetsTS/widget_detail/view.js
+++ b/widgetsTS/widget_detail/view.js
@@ -252,6 +252,7 @@
async: false, //鍚屾
url: backend_url,
success: function (data) {
+ console.log(data,"wange")
var tableData = data.data.result;
if (tableData != null && tableData.length > 0) {
var seriesObj = {};
diff --git a/widgetsTS/widget_grid/webworker.js b/widgetsTS/widget_grid/webworker.js
index c086618..347a315 100644
--- a/widgetsTS/widget_grid/webworker.js
+++ b/widgetsTS/widget_grid/webworker.js
@@ -487,13 +487,16 @@
function createKrigingGrid(dataItems,gridLevel,qindex) {
+ console.log(dataItems,"dataItems")
var t = [];
var x = [];
var y = [];
for (var i = 0, len = dataItems.length; i < len; i++) {
+
t.push(dataItems[i][qindex]); // 鏉冮噸鍊�
var tmp_grid_id = dataItems[i]["grid_id"];
+ console.log(tmp_grid_id,"no split")
var lon_lat = tmp_grid_id.split("_");
if (gridLevel == 5000) {
x.push(Number(lon_lat[0]) + 0.025); // x
@@ -517,6 +520,7 @@
console.log("webworker is loaded.");
this.onmessage = event => {
+ console.log(event,"event")
self.postMessage(createKrigingGrid(event.data.dataItems,event.data.gridLevel,event.data.qindex));
//self.close();
}
--
Gitblit v1.9.1