⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 polygonarea.htm

📁 arcims简单实例图解 xiang huandianfen
💻 HTM
字号:
<meta http-equiv="Content-Type" content="text/html; charset=GB2312">
<html>

 <head>
 
  <title>Select Polygon Area</title>
  
  <meta HTTP-EQUIV="Pragma" CONTENT="no-cache">
  
  <script type="text/javascript" LANGUAGE="JavaScript">

   var t;
   
   if (opener)
   {
    
    if (opener.name == "MapFrame")
    {
     t = opener.parent.MapFrame;
    }
    else
    {
     t = opener;
    }
    
   }
   else
   {
    
    if (parent.MapFrame)
    {
     t = parent.MapFrame;
    }
    else
    {
     t=document;
    }
    
   }

//Complete the polygon
//--------------------  
  function doPolygonArea()
  {
   var theCount = t.clickPolyAreaCount;
  
 //Need 3 points for a polygon
 //---------------------------
   if (theCount > 2)
   {
    
  //Function in aimsCustom
  //----------------------  
    t.completePolygonArea();
   }
   else
   {
    alert("至少需要三点.");
   }
  }


//Starts the process over without
//disturbing other acetate layer objects
//--------------------------------------
  function restartClick()
  {
 
   var theCount = t.clickPolyAreaCount;

 //If no points then do not restart
 //--------------------------------
   if (theCount > 0)
   {
   
  //Function in aimsclick
  //--------------------- 
    t.restartPolyAreaClick();
   }
    
  }

//Delete last point entered
//-------------------------
  function deleteClick()
  {

   var theCount = t.clickPolyAreaCount;

 //If no points then do not delete
 //-------------------------------
   if (theCount > 0)
   {

  //Function in aimsclick
  //---------------------       
    t.deletePolyAreaClick();
   } 
  }
  function showorhide()
  {
   t.hideorshow();
  }
  function setAreaUnits()
  {
   var cmb = document.PolygonArea.cmbAreaUnits;
   var theUnit = cmb[cmb.selectedIndex].value;
       
  //If geographic coords then use feet as area unit
  //-----------------------------------------------
    if ((parent.MapFrame.MapUnits == "DEGREES") || (parent.MapFrame.MapUnits == "METERS"))
    {    
     switch(theUnit)
     {
      case "KILOMETERS":
       t.theConversion = 1000000;
       t.theUnitLabel = " 平方公里";
       break;      
      
      default: //(METERS) 
       t.theConversion = 1;      
       t.theUnitLabel = " 平方米";      
       break;
     } 

    } 
    else
    {
     switch(theUnit)
     {
      case "KILOMETERS":
       t.theConversion = 10763870;
       t.theUnitLabel = " 平方公里";
       break;      

      default: //("FEET")
       t.theConversion = 10.76387;
       t.theUnitLabel = " 平方米";
       break;      
     } 
    }    
    
  } 
    
 </script>

 </head>

 <body bgcolor="#C0C0C0" text="Black" topmargin=0 leftmargin=0 onload="window.focus()">

  <form name="PolygonArea">
  
   <center> 
   
   <table width="100%" cellspacing="1" nowrap bgcolor="#C0C0C0" cellpadding="2" height="70">
   
    <tr>
    
     <th colspan="3" align="center" height="18" width="100%">
      <b><font face="Verdana" size="3">面积量算</font></b>
     </th>
     
    </tr>

   <tr>
    <td align="center" height="20" width="20%" valign="middle">
     <input type="Button" name="hide" value="     隐藏\显示     " onclick="showorhide()">
    </td>
    <td align="center" height="20" width="20%" valign="middle">
     <input type="Button" name="restart" value="     重新开始     " onclick="restartClick()">
    </td>

    <td align="center" height="18" width="20%" valign="middle">
     <input type="Button" name="deletelast" value=" 删除上一点 " onclick="deleteClick()">
    </td>

    <td align="center" height="18" width="60%" valign="middle">
     <img SRC="images/poly_1.gif" width=16 height=16 hspace=0 vspace=0 border=0 alt="">
     <input type="Button" name="useShape1" value="完成面积量算" onclick="doPolygonArea()"> 
    </td>
    
   </tr>
   
   <script type="text/javascript" language="JavaScript">   

    document.writeln('<tr><td colspan="3" width="100%" valign="bottom" align="left">&nbsp;</td></tr>');   
    document.writeln('<tr><td colspan="3" width="100%" valign="bottom" align="left">');
    document.writeln('<b><font face="Verdana" size="2">面积量算单位:</font></b>');

    document.writeln('<select name="cmbAreaUnits" style="font-family: Verdana; font-size: 9pt" onchange="setAreaUnits()">');

    document.write('<option value="METERS">米');
    document.write('<option value="KILOMETERS">公里');
            
    document.writeln('</select>');

  //Set initial parameters
  //----------------------
     t.theConversion = 1;      
     t.theUnitLabel = " 平方米";      
        
   </script>
   
  </td></tr></table>
  
  </center>
  
 </form>

 </body>

</html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -