| | |
| | | <style> |
| | | </style> |
| | | </head> |
| | | <body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" style="border: 0px; overflow: hidden;" id="Body" class="hideUntillTranslated ToolButtonsArea" onload="Init()" onunload="OnUnload()"> |
| | | <!--oncontextmenu="return false;"> onclick="bHide=true;HideOptionsNow()" > --> |
| | | |
| | | <table border="0" width="100%" class="s8w" cellspacing="0" cellpadding="0"> |
| | | <tr > |
| | | <body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" style="border: 0px" id="Body" class="hideUntillTranslated" onload="Init()" onunload="OnUnload()"> |
| | | <!--oncontextmenu="return false;"> onclick="bHide=true;HideOptionsNow()" > --> |
| | | <table border="0" width="100%" cellspacing="0" cellpadding="0"> |
| | | <tr class="s8"> |
| | | <td> |
| | | <table class="PropertiesSheet" cellspacing="0" cellpadding="0" ></table> |
| | | </td> |
| | | <tr> |
| | | <tr class="s8"> |
| | | <td colspan="2" align="left" class="ToolButtonsArea" style="border-bottom: 2px solid #ffffff;"> |
| | | <button id="deleteMeasure" class="MenuButton2" style="border:none;" onclick="OnDeleteMeasure();"><img src="./img/delete.png" /></button> |
| | | <button id="deleteLastPoint" class="MenuButton2" style="border:none;" onclick="OnDeleteLastPoint()"><img src="./img/delete_last_point.png" /></button> |
| | | <button id="snapping" class="MenuButton2" style="border-right: 2px solid #ffffff;" onclick="OnSnapping()"><img src="./img/snap.png" /><br /></button> |
| | | <button id="horizontalSurface" class="MenuButton2" style="border:none;" onclick="OnHorizontalSurface()"><img src="./img/horizontal.png" /><br /></button> |
| | | <button id="3dPlane" class="MenuButton2" style="border:none;" onclick="On3DPlane()"><img src="./img/3d_palne_area.png" /><br /></button> |
| | | <button id="terrainSurface" class="MenuButton2" style="border-left: 2px solid #ffffff;border-right: none;" onclick="OnTerrainSurface()"><img src="./img/surface.png" /><br /></button> |
| | | <button id="deleteMeasure" class="MenuButton2" style="border:none;" onclick="OnDeleteMeasure();"><img src="./img/delete.png" /><br/><!--<span class="i18n">Text0</span>--></button> |
| | | <button id="deleteLastPoint" class="MenuButton2" style="border:none;" onclick="OnDeleteLastPoint()"><img src="./img/delete_last_point.png" /><br /><!--<span class="i18n">Text1</span>--></button> |
| | | <button id="snapping" class="MenuButton2" style="border-right: 2px solid #ffffff;" onclick="OnSnapping()"><img src="./img/snap.png" /><br /><!--<span class="i18n" style="font:#2A4EA5">Text7</span>--></button> |
| | | <button id="horizontalSurface" class="MenuButton2" style="border:none;" onclick="OnHorizontalSurface()"><img src="./img/horizontal.png" /><br /><!--<span class="i18n" style="font:#2A4EA5">Text2</span>--></button> |
| | | <button id="3dPlane" class="MenuButton2" style="border-right: 2px solid #ffffff;" onclick="On3DPlane()"><img src="./img/3d_palne_area.png" /><br /><!--<span class="i18n" style="font:#2A4EA5">Text4</span>--></button> |
| | | <button id="terrainSurface" class="MenuButton2" style="border:none;" onclick="OnTerrainSurface()"><img src="./img/surface.png" /><br /><!--<span class="i18n" style="font:#2A4EA5">Text3</span>--></button> |
| | | |
| | | </td> |
| | | |
| | | </tr> |
| | | </table> |
| | | |
| | | |
| | | <table border="0" width="100%" class="s8w ToolButtonsArea" cellspacing="0" cellpadding="3pt"> |
| | | |
| | | <tr id="createTRId"> |
| | | <td > |
| | | <span class="i18n s8w" style="vertical-align:top;">Text6</span> |
| | | <input type="checkbox" align="bottom" id="createMeasurementObject" style="width:25px;" onclick="CreateMeasurementObject();"/> |
| | | <tr class="s8" height="40"> |
| | | <td align="left" class="ToolButtonsArea" style="color:#ffffff;"> |
| | | <span class="i18n" style="vertical-align:top;">Text6</span> |
| | | |
| | | <input type="checkbox" align="bottom" id="createMeasurementObject" style="width:25px;" onclick="CreateMeasurementObject();"/> |
| | | </td> |
| | | </tr> |
| | | |
| | | <tr > |
| | | <td class="textarea-container" > |
| | | <div class="textarea-size s8w" ></div> |
| | | <tr class="s8" height="48" bgcolor="0"> |
| | | <td class="textarea-container" style="color:#ffffff"> |
| | | <style> |
| | | div.textarea-size{font-size: 12px;} |
| | | </style> |
| | | <div class="textarea-size" ></div> |
| | | </td> |
| | | </tr> |
| | | |
| | | <tr id="sampleIntervalTR"> |
| | | <td align="left" > |
| | | <span class="i18n s8w">Text5</span> |
| | | <input type="text" id= "sampleInterval" style="width:25px; height:13px; background-color:#000000; color:#FFFFFF; padding:1px; margin-left: 2px;margin-right: 2px;" onkeypress="OnSampleInterval(event)"/> |
| | | <span class="i18n s8w">Text18</span> |
| | | <tr class="s8" bgcolor="0"> |
| | | <td align="left" class="ToolButtonsArea" style="color:#ffffff"> |
| | | <span class="i18n">Text5</span><input type="text" id= "sampleInterval" style="width:25px; height:11px; background-color:#000000; color:#FFFFFF;" onkeypress="OnSampleInterval(event)"/><span class="i18n">Text18</span> |
| | | </td> |
| | | </tr> |
| | | |
| | | <tr id="surfaceResultTR" > |
| | | <td class="textarea-container_surface" > |
| | | |
| | | <div class="textarea-size_surface s8w" ></div> |
| | | <tr class="s8" bgcolor="0" > |
| | | <td class="textarea-container_surface" style="color:#ffffff"> |
| | | <style> |
| | | div.textarea-size_surface{font-size: 12px} |
| | | </style> |
| | | <div class="textarea-size_surface" ></div> |
| | | </td> |
| | | </tr> |
| | | |
| | | |
| | | <tr id="unitTRId"> |
| | | <td align="right" > |
| | | <u><a class="btn btn-primary" href="#" role="button" id= "changeMeasurementUnits" onclick="OnChangeMeasurementUnits()"><span class="i18n s8w" style="padding-right:5px;">Text17</span></a></u> |
| | | <tr class="s8"> |
| | | <td align="right" bgcolor="0"> |
| | | <u style="color:#ffffff"><a class="btn btn-primary" style="color:#ffffff" href="#" role="button" id= "changeMeasurementUnits" onclick="OnChangeMeasurementUnits()"><span class="i18n" style="padding-right:5px;">Text17</span></a></u> |
| | | </td> |
| | | </tr> |
| | | </tr> |
| | |
| | | |
| | | |
| | | <script language="javascript" src="../jquery/jquery-3.1.1.min.js"></script> |
| | | <script language="javascript" src="../ToolsCommon71.js"></script> |
| | | <script language="javascript" src="../ToolsCommon70.js"></script> |
| | | |
| | | |
| | | |
| | |
| | | var g_bCalculateTerrainArea; |
| | | var _3D_PLANE_NAME = "plane"; |
| | | var _HORIZONTAL_NAME = "horizontal"; |
| | | //--------------------------------- |
| | | function Init() |
| | | { |
| | | document.getElementById("changeMeasurementUnits").value=SGLang.i18n("Text17"); |
| | | document.getElementById("sampleInterval").value=5; |
| | | |
| | | var isPM = GetParamValue("pm", "0"); // when opening this tool in PM we want to hide several options |
| | | if (isPM=="1"){ |
| | | $("#unitTRId").hide(); |
| | | $("#createTRId").hide(); |
| | | $("#terrainSurface").hide(); |
| | | $("#sampleIntervalTR").hide(); |
| | | $("#surfaceResultTR").hide(); |
| | | } |
| | | |
| | | $("#deleteMeasure").attr('title', SGLang.i18n("Text19")); |
| | | $("#deleteLastPoint").attr('title', SGLang.i18n("Text20")); |
| | | $("#snapping").attr('title', SGLang.i18n("Text21")); |
| | | $("#horizontalSurface").attr('title', SGLang.i18n("Text22")); |
| | | $("#3dPlane").attr('title', SGLang.i18n("Text23")); |
| | | $("#terrainSurface").attr('title', SGLang.i18n("Text24")); |
| | | |
| | | |
| | | textContainer = document.querySelector('.textarea-container'); |
| | | textareaSize = textContainer.querySelector('.textarea-size'); |
| | | textareaSize.innerText = SGLang.i18n("Text25"); |
| | | |
| | | textContainer = document.querySelector('.textarea-container_surface'); |
| | | textareaSize = textContainer.querySelector('.textarea-size_surface'); |
| | | textareaSize.innerText = SGLang.i18n("Text26"); |
| | | |
| | | |
| | | SGWorld.AttachEvent("OnMeasurementAreaResult", OnMeasurementResult); |
| | | SGWorld.AttachEvent("OnInputModeChanged", OnInputModeChanged); |
| | | SGWorld.AttachEvent("OnEndDrawMeasurement", OnEndDrawMeasurement); |
| | | |
| | | var bCreateMeasurementObject = (isPM=="1")?false:SGWorld.GetOptionParam("CreateMeasurementObjects"); |
| | | document.getElementById("createMeasurementObject").checked = bCreateMeasurementObject; |
| | | CreateMeasurementObject(); |
| | | |
| | | Reset(1,0); |
| | | if(SGWorld.GetOptionParam("AreaMeasurementDefaultMode") == _3D_PLANE_NAME) |
| | | document.getElementById("3dPlane").click(); |
| | | else |
| | | document.getElementById("horizontalSurface").click(); |
| | | |
| | | |
| | | } |
| | | //--------------------------------- |
| | | function Reset(FirstTime, FromMouseInputMode) |
| | | { |
| | | |
| | | ResetButtons(); |
| | | SGWorld.Window.SetInputMode(0); |
| | | gGeometry = null; |
| | | } |
| | | //--------------------------------- |
| | | function OnSampleInterval(evt) |
| | | { |
| | | |
| | | |
| | | |
| | | var theEvent = evt || window.event; |
| | | |
| | | // Handle paste |
| | |
| | | } |
| | | |
| | | } |
| | | //--------------------------------- |
| | | |
| | | |
| | | |
| | | function OnDeleteMeasure() |
| | | { |
| | | var is3dPlane = $("#3dPlane").hasClass("MenuButtonHighlight"); |
| | |
| | | |
| | | EnableDisableButtons(); |
| | | } |
| | | //--------------------------------- |
| | | |
| | | function OnUnload() |
| | | { |
| | | var measurementMode = SGWorld.GetParam(9916); |
| | | if(measurementMode == 33351/*ID_MEASURE_TERRAIN_AREA*/ || measurementMode == 33350/*ID_MEASURE_AREA*/) |
| | | SGWorld.Window.SetInputMode(0); |
| | | } |
| | | //--------------------------------- |
| | | |
| | | function OnEndDrawMeasurement(geometry) |
| | | { |
| | | gGeometry = geometry; |
| | | EnableDisableButtons(); |
| | | } |
| | | //--------------------------------- |
| | | |
| | | function Init() |
| | | { |
| | | document.getElementById("changeMeasurementUnits").value=SGLang.i18n("Text17"); |
| | | document.getElementById("sampleInterval").value=5; |
| | | |
| | | |
| | | document.getElementById("deleteMeasure").title=SGLang.i18n("Text19"); |
| | | document.getElementById("deleteLastPoint").title=SGLang.i18n("Text20"); |
| | | document.getElementById("snapping").title=SGLang.i18n("Text21"); |
| | | document.getElementById("horizontalSurface").title=SGLang.i18n("Text22"); |
| | | document.getElementById("3dPlane").title=SGLang.i18n("Text23"); |
| | | document.getElementById("terrainSurface").title=SGLang.i18n("Text24"); |
| | | |
| | | |
| | | textContainer = document.querySelector('.textarea-container'); |
| | | textareaSize = textContainer.querySelector('.textarea-size'); |
| | | textareaSize.innerText = SGLang.i18n("Text25"); |
| | | |
| | | textContainer = document.querySelector('.textarea-container_surface'); |
| | | textareaSize = textContainer.querySelector('.textarea-size_surface'); |
| | | textareaSize.innerText = SGLang.i18n("Text26"); |
| | | |
| | | |
| | | SGWorld.AttachEvent("OnMeasurementAreaResult", OnMeasurementResult); |
| | | SGWorld.AttachEvent("OnInputModeChanged", OnInputModeChanged); |
| | | SGWorld.AttachEvent("OnEndDrawMeasurement", OnEndDrawMeasurement); |
| | | |
| | | |
| | | //Turn off CreateMeasurementObject |
| | | // SGWorld.Command.Execute(2226,0); |
| | | |
| | | |
| | | var bCreateMeasurementObject = SGWorld.GetOptionParam("CreateMeasurementObjects"); |
| | | document.getElementById("createMeasurementObject").checked = bCreateMeasurementObject; |
| | | |
| | | Reset(1,0); |
| | | if(SGWorld.GetOptionParam("AreaMeasurementDefaultMode") == _3D_PLANE_NAME) |
| | | document.getElementById("3dPlane").click(); |
| | | else |
| | | document.getElementById("horizontalSurface").click(); |
| | | |
| | | |
| | | } |
| | | |
| | | |
| | | function OnInputModeChanged(mode) |
| | | { |
| | | if(mode==0) |
| | |
| | | ResetButtons(); |
| | | } |
| | | } |
| | | //--------------------------------- |
| | | |
| | | |
| | | |
| | | function OnMeasurementResult(measurementResult,SounrceID) |
| | | { |
| | | measurementResult = measurementResult.replace("N/A", "不适用") |
| | | .replace("Surface Area:", "表面积:") |
| | | .replace("Area:", "面积:") |
| | | .replace("Square Meter", "平方米") |
| | | .replace("Square km", "平方千米") |
| | | .replace("Perimeter: ", "周长:") |
| | | .replace(/Km/g, " 千米") |
| | | .replace(/m/g, " 米"); |
| | | |
| | | if(!g_bCalculateTerrainArea) |
| | | { |
| | | textContainer = document.querySelector('.textarea-container'); |
| | |
| | | EnableDisableButtons(); |
| | | |
| | | return true; |
| | | } |
| | | //--------------------------------- |
| | | |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | function OnChangeMeasurementUnits() |
| | | { |
| | | SGWorld.Command.Execute(1011,3); |
| | | } |
| | | //--------------------------------- |
| | | |
| | | function CreateMeasurementObject() |
| | | { |
| | | var bCreateMeasurementObject = document.getElementById("createMeasurementObject").checked==true; |
| | | SGWorld.SetOptionParam("CreateMeasurementObjects",bCreateMeasurementObject); |
| | | } |
| | | //--------------------------------- |
| | | |
| | | function EnableDisableButtons() |
| | | { |
| | | var bEnableTerrainSurface = $("#horizontalSurface").hasClass("MenuButtonHighlight") && gGeometry!=null; |
| | |
| | | document.getElementById("deleteLastPoint").style.opacity = 0.3; |
| | | } |
| | | } |
| | | //--------------------------------- |
| | | function ResetButtons() |
| | | { |
| | | $("#horizontalSurface").removeClass("MenuButtonHighlight"); |
| | |
| | | |
| | | } |
| | | |
| | | //--------------------------------- |
| | | //------------------ |
| | | // Reset |
| | | //------------------ |
| | | function Reset(FirstTime, FromMouseInputMode) |
| | | { |
| | | |
| | | ResetButtons(); |
| | | SGWorld.Window.SetInputMode(0); |
| | | gGeometry = null; |
| | | } |
| | | |
| | | |
| | | |
| | | function SetSnapping() |
| | | { |
| | | if( $("#snapping").hasClass("MenuButtonHighlight")) |
| | |
| | | else |
| | | SGWorld.SetParam(9912,0); |
| | | } |
| | | //--------------------------------- |
| | | |
| | | |
| | | |
| | | function OnSnapping() |
| | | { |
| | | //$("#snapping").removeClass("MenuButtonHighlight"); |
| | |
| | | } |
| | | |
| | | } |
| | | //--------------------------------- |
| | | |
| | | function On3DPlane() |
| | | { |
| | | |
| | |
| | | |
| | | Reset(0,0); |
| | | $(event.srcElement).addClass("MenuButtonHighlight"); |
| | | SGWorld.Command.Execute(2358,0);//__TEC_MEASURE_AREA |
| | | SGWorld.Command.Execute(1037,0); |
| | | |
| | | textContainer = document.querySelector('.textarea-container'); |
| | | textareaSize = textContainer.querySelector('.textarea-size'); |
| | |
| | | |
| | | EnableDisableButtons(); |
| | | } |
| | | //--------------------------------- |
| | | |
| | | function OnTerrainSurface() |
| | | { |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | //Reset(0,0); |
| | | g_bCalculateTerrainArea = true; |
| | | if(document.getElementById("sampleInterval").value>0.0) |
| | | SGWorld.Command.Execute(2359/*__TEC_MEASURE_TERRAIN_AREA*/,document.getElementById("sampleInterval").value); |
| | | g_bCalculateTerrainArea = true; |
| | | SGWorld.Command.Execute(1165,document.getElementById("sampleInterval").value); |
| | | g_bCalculateTerrainArea = false; |
| | | |
| | | SetSnapping(); |
| | | } |
| | | //--------------------------------- |
| | | |
| | | function OnHorizontalSurface() |
| | | { |
| | | if( $(event.srcElement).hasClass("MenuButtonHighlight")) |
| | |
| | | |
| | | Reset(0,0); |
| | | $(event.srcElement).addClass("MenuButtonHighlight"); |
| | | SGWorld.Command.Execute(2359/*__TEC_MEASURE_TERRAIN_AREA*/,0); |
| | | SGWorld.Command.Execute(1165,0); |
| | | |
| | | textContainer = document.querySelector('.textarea-container'); |
| | | textareaSize = textContainer.querySelector('.textarea-size'); |
| | |
| | | SGWorld.SetOptionParam("AreaMeasurementDefaultMode",_HORIZONTAL_NAME); |
| | | EnableDisableButtons(); |
| | | } |
| | | //--------------------------------- |
| | | |
| | | function OnDeleteLastPoint() |
| | | { |
| | | SGWorld.SetParam(9914,0); |
| | |
| | | </html> |
| | | |
| | | |
| | | <!--Sig:00000040au6WjiNW.uqyaxQdPdCltSVnmGMYOWXEgBB9yrqQ.Kyq91MhWbUupggV5yi1GRel4nJZMYQa3tOFAX56jNS8XmJJ--> |
| | | <!--Sig:00000040cmE.PBmLiWjz#bS.7ZWINxbOMbqfXqeomSoDY5dub1B7HFdROoCX7zoMTDDWngnh3FAbpgzaoXzBPqFecaMgMAJJ--> |