| | |
| | | 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; |
| | |
| | | |
| | | return this; |
| | | }, |
| | | |
| | | |
| | | format: function () { |
| | | this.lineLen = parseFloat(this.lineLen.toFixed(2)); |
| | | this.polyArea = parseFloat(this.polyArea.toFixed(2)); |
| | |
| | | var gid = SGWorld.ProjectTree.FindItem(groupName); |
| | | if (gid) SGWorld.ProjectTree.DeleteItem(gid); |
| | | } |
| | | catch (e) { |
| | | console.log(e); |
| | | } |
| | | catch (e) { } |
| | | } |
| | | |
| | | function getFeatureLayers() { |
| | |
| | | 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; |
| | |
| | | } |
| | | } |
| | | } |
| | | for (var i = 0; i < fs.Count; i++) { |
| | | fs.Item(i).Tint.abgrColor = 0xff800080; |
| | | } |
| | | } catch (e) { |
| | | console.log(e); |
| | | layers.splice(i, 1); |
| | | } |
| | | } |