wangzhibo
2021-10-04 1a787586549ef44775cdbd05d7150bba2cbb69f6
bug fix
3个文件已修改
40 ■■■■■ 已修改文件
data/getLayerListByUserid.json 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
js/function_1004.js 33 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
widgetsTS/widget_detail/view.js 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
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
        },
        {
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/>类型:&nbsp;" +
        item["code"].substring(0, 2) == "BS" ? "公交车" : "出租车" +
        "<br />车辆编号:&nbsp;" +
        item["code"] +
        "<br/>数据时间:&nbsp;" +
        item["datatime"] +
        "<br />瞬时车速:&nbsp;&nbsp;&nbsp;" +
        item["speed"] + "&nbsp;(km/h)" +
        "<br />粉尘PM2.5:&nbsp;" +
        item["pm25"] + "&nbsp;(ug/m3)" +
        "<br />粉尘PM10:&nbsp;&nbsp;" +
        item["pm10"] + "&nbsp;(ug/m3)" +
        "<br />NO浓度:&nbsp;&nbsp;&nbsp;" +
        item["no"] + "&nbsp;(ug/m3)" +
        "<br />NO2浓度:&nbsp;&nbsp;" +
        item["no2"] + "&nbsp;(ug/m3)" +
        "<br />NO+NO2浓度:&nbsp;" +
        item["nox"] + "&nbsp;(ug/m3)" +
        "<br />CO浓度值:&nbsp;&nbsp;&nbsp;&nbsp;" +
        item["co"] + "&nbsp;&nbsp;(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,
widgetsTS/widget_detail/view.js
@@ -173,7 +173,7 @@
                    grid: {
                        top: '20%', // 等价于 y: '16%'
                        left: '3%',
                        right: '8%',
                        right: '5%',
                        bottom: '3%',
                        containLabel: true
                    },