管道基础大数据平台系统开发-【CS】-ExportMap
13693261870
2024-01-12 31fd525edda7e78dfa1badd04e6f9f23f20af664
TEWin/Resources/SpaceStatistics/SpaceStatistics.html
@@ -40,6 +40,15 @@
      maxHeight: 0, // 三维体最高高度
      reset: function () {
        var layers = getFeatureLayers();
        for (var i in layers) {
          try{
            SGWorld.ProjectTree.GetObject(layers[i]).Refresh();
          } catch (e) {
            console.log(e);
          }
        }
        this.count = 0;
        this.lineLen = 0;
        this.polyArea = 0;
@@ -49,7 +58,7 @@
        return this;
      },
      format: function () {
        this.lineLen = parseFloat(this.lineLen.toFixed(2));
        this.polyArea = parseFloat(this.polyArea.toFixed(2));
@@ -90,9 +99,7 @@
        var gid = SGWorld.ProjectTree.FindItem(groupName);
        if (gid) SGWorld.ProjectTree.DeleteItem(gid);
      }
      catch (e) {
        console.log(e);
      }
      catch (e) { }
    }
    function getFeatureLayers() {
@@ -139,13 +146,11 @@
          if (fs.Count == 0) continue;
          rs.count += fs.Count;
          if (layer.GeometryType == 1) { // LGT_POLYLINE
            for (var j = 0; j < fs.Count; j++) {
              var f = fs.Item(j);
              rs.lineLen += f.Geometry.Length;
            }
            continue;
          }
          if (layer.GeometryType == 2) { // LGT_POLYGON
            var flag = layerName == layer.TreeItem.Name;
@@ -164,7 +169,11 @@
              }
            }
          }
          for (var i = 0; i < fs.Count; i++) {
            fs.Item(i).Tint.abgrColor = 0xff800080;
          }
        } catch (e) {
          console.log(e);
          layers.splice(i, 1);
        }
      }