管道基础大数据平台系统开发-【CS】-ExportMap
2
13693261870
2024-01-12 c7d629a57a1be6d55911b5b826f0e07db90e9460
TEWin/Resources/SpaceStatistics/SpaceStatistics.html
@@ -40,6 +40,17 @@
      maxHeight: 0, // 三维体最高高度
      reset: function () {
        //SGWorld.ProjectTree.EnableRedraw(0);
        var layers = getFeatureLayers();
        for (var i in layers) {
          try{
            SGWorld.ProjectTree.GetObject(layers[i]).Refresh();
          } catch (e) {
            console.log(e);
          }
        }
        //SGWorld.ProjectTree.EnableRedraw(1);
        this.count = 0;
        this.lineLen = 0;
        this.polyArea = 0;
@@ -49,7 +60,7 @@
        return this;
      },
      format: function () {
        this.lineLen = parseFloat(this.lineLen.toFixed(2));
        this.polyArea = parseFloat(this.polyArea.toFixed(2));
@@ -90,9 +101,7 @@
        var gid = SGWorld.ProjectTree.FindItem(groupName);
        if (gid) SGWorld.ProjectTree.DeleteItem(gid);
      }
      catch (e) {
        console.log(e);
      }
      catch (e) { }
    }
    function getFeatureLayers() {
@@ -139,13 +148,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,8 +171,12 @@
              }
            }
          }
          for (var j = 0; j < fs.Count; j++) {
            fs.Item(j).Tint.abgrColor = 0xff800080;
          }
        } catch (e) {
          layers.splice(i, 1);
          console.log(e);
          //layers.splice(i, 1);
        }
      }