| | |
| | | var gDebug = false; |
| | | var groupName = "空间统计"; |
| | | |
| | | var rs = { |
| | | count: 0, // 要素总个数 |
| | | |
| | | lineLen: 0, // 线对象长度 |
| | | |
| | | polyArea: 0, // 多边形面积 |
| | | |
| | | volume: 0, // 三维体体积 |
| | | |
| | | reset: function () { |
| | | this.count = 0; |
| | | this.lineLen = 0; |
| | | this.polyArea = 0; |
| | | this.valueOf = 0; |
| | | }, |
| | | |
| | | setVal: function () { |
| | | $("#totalNum").html(this.count.toString()); |
| | | $("#lineLen").html(this.lineLen.toString()); |
| | | $("#polyArea").html(this.polyArea.toString()); |
| | | $("#volume").html(this.volume.toString()); |
| | | } |
| | | }; |
| | | |
| | | $(function () { |
| | | init(); |
| | | }); |
| | |
| | | return layers; |
| | | } |
| | | |
| | | function changeLayer(e) { |
| | | var id = $(e).val(); |
| | | if (id) SGWorld.ProjectTree.SelectItem(id); |
| | | } |
| | | |
| | | var buffer = 0; |
| | | |
| | | function changeBuffer(e) { |
| | | var val = $(e).val(); |
| | | if (val == buffer || isNaN(val)) return; |
| | | |
| | | buffer = parseFloat(val); |
| | | SGWorld.Command.Execute(1096, buffer); |
| | | } |
| | | |
| | | function changeSR(e) { |
| | | var val = parseInt($(e).val()); |
| | | SGWorld.Command.Execute(1097, val); |
| | | } |
| | | |
| | | function openPropTab(e) { |
| | | SGWorld.Command.Execute(1086, null); |
| | | function clear(e) { |
| | | rs.reset(); |
| | | rs.setVal(); |
| | | delGroup(); |
| | | } |
| | | |
| | | function startQuery(e) { |
| | |
| | | return; |
| | | } |
| | | |
| | | SGWorld.Window.ShowMessageBarText("按 Esc 键退出"); |
| | | drawing.drawPolygon({ |
| | | style: { |
| | | lineColor: "#ff0000", |
| | |
| | | } |
| | | |
| | | function DrawPoly(geometry, type, altitudeType) { |
| | | //SGWorld.Window.ShowMessageBarText("按 Esc 键退出"); |
| | | SGWorld.ProjectTree.EnableRedraw(0); |
| | | alert(null==geometry); |
| | | //alert(null==geometry); |
| | | } |
| | | |
| | | function ResetAsync(FirstTime, FromMouseInputMode) { |
| | |
| | | <td class="s8b"> |
| | | <label for="Mode" class="i18n">多边形面积</label> |
| | | </td> |
| | | <td> <span id="polyArea">0</span> 平方千米 |
| | | <td> <span id="polyArea">0</span> 平方米 |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <td class="s8b"> |
| | | <label for="Mode" class="i18n">空间关系</label> |
| | | <label for="Mode" class="i18n">三维体体积</label> |
| | | </td> |
| | | <td> <select id="SpatialRelationship" onchange="changeSR(this);" style="width: 100pt;"> |
| | | <option class="i18n" value="1" selected="selected">相交</option> |
| | | <option class="i18n" value="2">包含</option> |
| | | </select> |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <td class="s8b"> |
| | | <label for="Mode" class="i18n">查询类型</label> |
| | | </td> |
| | | <td> <select id="SelectType" style="width: 100pt;"> |
| | | <option value="1074">点查</option> |
| | | <option value="1072">线查</option> |
| | | <option value="1071" selected="selected">面查</option> |
| | | <option value="1156">选择对象</option> |
| | | </select> |
| | | <td> <span id="volume">0</span> 立方米 |
| | | </td> |
| | | </tr> |
| | | </table> |
| | |
| | | <tr class="s8"> |
| | | <td align="center" class="ToolButtonsArea"> |
| | | <div id="SurfaceDiv"> |
| | | <button id="clipboardButton" class="MenuButton" onclick="openPropTab(this);" style="cursor: pointer;"> |
| | | <button id="clipboardButton" class="MenuButton" onclick="clear(this);" style="cursor: pointer;"> |
| | | <img src="img/delete.png" /><br /> |
| | | <span class="i18n">清 除</span></button> |
| | | <button id="DrawPlaneBtn" class="MenuButton MenuButtonLast" onclick="startQuery(this);" style="cursor: pointer;"> |