?? polygonarea.htm
字號(hào):
<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("A minimum of three points are required.");
}
}
//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 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 "ACRES":
t.theConversion = 4047;
t.theUnitLabel = " ACRES";
break;
case "FEET":
t.theConversion = 10.76387;
t.theUnitLabel = " SQFT";
break;
case "MILES":
t.theConversion = 2590000;
t.theUnitLabel = " SQMI";
break;
default: //(METERS)
t.theConversion = 1;
t.theUnitLabel = " SQM";
break;
}
}
else
{
switch(theUnit)
{
case "ACRES":
t.theConversion = 43560;
t.theUnitLabel = " ACRES";
break;
case "METERS":
t.theConversion = 10.76387;
t.theUnitLabel = " SQM";
break;
case "MILES":
t.theConversion = 27878400;
t.theUnitLabel = " SQMI";
break;
default: //("FEET")
t.theConversion = 1;
t.theUnitLabel = " SQFT";
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">Polygon Area</font></b>
</th>
</tr>
<tr>
<td align="center" height="20" width="20%" valign="middle">
<input type="Button" name="restart" value=" Restart " onclick="restartClick()">
</td>
<td align="center" height="18" width="20%" valign="middle">
<input type="Button" name="deletelast" value=" Delete Last Point " onclick="deleteClick()">
</td>
<td align="center" height="18" width="60%" valign="middle">
<img SRC="images/select_poly_1.gif" width=16 height=16 hspace=0 vspace=0 border=0 alt="">
<input type="Button" name="useShape1" value="Complete Polygon" onclick="doPolygonArea()">
</td>
</tr>
<script type="text/javascript" language="JavaScript">
document.writeln('<tr><td colspan="3" width="100%" valign="bottom" align="left"> </td></tr>');
document.writeln('<tr><td colspan="3" width="100%" valign="bottom" align="left">');
document.writeln('<b><font face="Verdana" size="2">Output Units for Area Calculation:</font></b>');
document.writeln('<select name="cmbAreaUnits" style="font-family: Verdana; font-size: 9pt" onchange="setAreaUnits()">');
document.write('<option value="FEET"');
if ((t.MapUnits == "FEET") ||(t.MapUnits == "DEGREES")) document.write(' selected');
document.write('>FEET');
document.write('<option value="METERS"');
if (t.MapUnits == "METERS") document.write(' selected');
document.write('>METERS');
document.write('<option value="ACRES">ACRES');
document.write('<option value="MILES">MILES');
document.writeln('</select>');
//Set initial parameters
//----------------------
if (parent.MapFrame.MapUnits == "DEGREES")
{
t.theConversion = 10.291264;
t.theUnitLabel = " SQFT";
}
else if (parent.MapFrame.MapUnits == "METERS")
{
t.theConversion = 1;
t.theUnitLabel = " SQM";
}
else
{
t.theConversion = 1;
t.theUnitLabel = " SQFT";
}
</script>
</td></tr></table>
</center>
</form>
</body>
</html>
?? 快捷鍵說(shuō)明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -