From 1a787586549ef44775cdbd05d7150bba2cbb69f6 Mon Sep 17 00:00:00 2001
From: wangzhibo <wangzhibo@shsening.com>
Date: 星期一, 04 十月 2021 17:34:11 +0800
Subject: [PATCH] bug fix
---
data/getLayerListByUserid.json | 5 +++++
widgetsTS/widget_detail/view.js | 2 +-
js/function_1004.js | 33 +++------------------------------
3 files changed, 9 insertions(+), 31 deletions(-)
diff --git a/data/getLayerListByUserid.json b/data/getLayerListByUserid.json
index 1c756b3..f885a9e 100644
--- a/data/getLayerListByUserid.json
+++ b/data/getLayerListByUserid.json
@@ -21,6 +21,7 @@
"style_prefix":"point_weizhan_",
"style_selected":"pm25",
"styleoptions": ["pm25", "pm10","no2", "co"],
+ "regiontype":"00",
"show":false
},
{
@@ -32,6 +33,7 @@
"style_prefix":"point_jiance_",
"style_selected":"tsp",
"styleoptions": ["tsp"],
+ "regiontype":"00",
"show":false
},
{
@@ -54,6 +56,7 @@
"style_prefix":"polyline_road_",
"style_selected":"pm25",
"styleoptions": ["pm25", "pm10", "no", "no2", "nox", "co"],
+ "regiontype":"00",
"show":false
},
{
@@ -173,6 +176,7 @@
"style_prefix":"vis_grid100_1000_5000_",
"style_selected":"pm25",
"styleoptions": ["pm25", "pm10", "no", "no2", "nox", "co"],
+ "regiontype":"00",
"show":false
},
{
@@ -184,6 +188,7 @@
"style_prefix":"vis_grid100_1000_5000_",
"style_selected":"pm25",
"styleoptions": ["pm25", "pm10", "no", "no2", "nox", "co"],
+ "regiontype":"00",
"show":false
},
{
diff --git a/js/function_1004.js b/js/function_1004.js
index eb75b95..46425e7 100644
--- a/js/function_1004.js
+++ b/js/function_1004.js
@@ -24,33 +24,9 @@
taxi_layer.on(mars3d.EventType.click, function (event) {
console.log("鐩戝惉layer锛屽崟鍑讳簡鐭㈤噺瀵硅薄", event);
var item = event.graphic?.attr;
+ console.log(item);
});
- taxi_layer.bindPopup(function (event) {
- let item = event.graphic?.attr;
- var html =
- "<br/>绫诲瀷锛� " +
- item["code"].substring(0, 2) == "BS" ? "鍏氦杞�" : "鍑虹杞�" +
- "<br />杞﹁締缂栧彿锛� " +
- item["code"] +
- "<br/>鏁版嵁鏃堕棿锛� " +
- item["datatime"] +
- "<br />鐬椂杞﹂�燂細 " +
- item["speed"] + " (km/h)" +
- "<br />绮夊皹PM2.5锛� " +
- item["pm25"] + " (ug/m3)" +
- "<br />绮夊皹PM10锛� " +
- item["pm10"] + " (ug/m3)" +
- "<br />NO娴撳害锛� " +
- item["no"] + " (ug/m3)" +
- "<br />NO2娴撳害锛� " +
- item["no2"] + " (ug/m3)" +
- "<br />NO+NO2娴撳害锛� " +
- item["nox"] + " (ug/m3)" +
- "<br />CO娴撳害鍊�: " +
- item["co"] + " (mg/m3)" +
- "<br /><br /><p><a href='#' onclick='javascript:showDetail(1001,\"" + item["code"] + "\")' ><span style='color:#ff00ff'>鍘嗗彶杞ㄨ抗鍥炴斁</span></a></p>";
- return html;
- });
+ taxi_layer.bindPopup(bindPopupFunction);
getTaxiListFromServerByUserId(taxi_layer);
}
@@ -86,9 +62,7 @@
if (current_date.getSeconds() != last_time_second) {
last_time_second = current_date.getSeconds();
changeTaxiLayerStyleAndAttr(getFormattedDateTime(current_date));
-
}
-
});
}
@@ -101,7 +75,6 @@
//console.log(tmpattr);
if (tmpattr && tmpattr != null) {
//item.options.attr = tmpattr;
-
item.setOptions({
attr: tmpattr,
style: {
@@ -146,7 +119,7 @@
attr: result.data.result[0],
style: {
url: "gltf/" + (result.data.result[0]["code"]).substring(0, 2) + ".gltf",
- scale: 0.5,
+ scale:5,
minimumPixelSize: 20,
highlight: {
type: mars3d.EventType.click,
diff --git a/widgetsTS/widget_detail/view.js b/widgetsTS/widget_detail/view.js
index 4482988..c7ac133 100644
--- a/widgetsTS/widget_detail/view.js
+++ b/widgetsTS/widget_detail/view.js
@@ -173,7 +173,7 @@
grid: {
top: '20%', // 绛変环浜� y: '16%'
left: '3%',
- right: '8%',
+ right: '5%',
bottom: '3%',
containLabel: true
},
--
Gitblit v1.9.1