📄 gisviewer3.htc
字号:
if(vtop + vheight > shadowHeight && vtop > 0){//超出下边界
vheight = shadowHeight - vtop;
}else if(vtop + vheight > shadowHeight && vtop < 0){
vheight = shadowHeight;
}
if(vleft < 0){//超出左边界
vleft = 0;
}
if(vtop < 0 ){//超出右边界
vtop = 0;
}
//*********************************************************
with(objShadowFocusDiv){//设置鹰眼焦点选择框的位置属性
style.top = vtop + flConstantWinCloseButWidth;
style.left = Math.abs(vleft);
style.width = parseFloat(Math.abs(vwidth)) + 1;
style.height = parseFloat(Math.abs(vheight));
}
}
////***********图层操作********************///////////////////////////////////////////////////////
function putActiveLayer(anyLayer){ //变换当前激活图层
switch(typeof(anyLayer)){
case "integer": //图层索引
intActiveLayerIndex = anyLayer;
break;
case "string": //图层名称
for( var i = 0;i < arrLayerList.length ; i++){
if(arrLayerList[i].name == "anyLayer"){
intActiveLayerIndex = parseInt(arrLayerList[i].id);
}
}
break;
}
}
function getActiveLayer(){ //获得当前激活图层
return intActiveLayerIndex; //返回当前激活图层的索引
}
function setActiveLayer(){ //设置图层为激活图层
var objLayerVisibleList; //可视的图层列表
var objLayerIndex,objResponseXML;
var strRefreshLayerArcXML , strXML = "";
var intPreActiveLayerIndex;
var objSwapItem;
var boolChange = false;
var strSwap,objFeatureNodes,arrIndexID,strVisible;
intPreActiveLayerIndex = intActiveLayerIndex;
for(var i=0;i<this.document.all("activeLayer").length;i++){
if(this.document.all("activeLayer")[i].checked){
intActiveLayerIndex = this.document.all("activeLayer")[i].value;
break;
}
}
objLayerVisibleList = this.document.getElementsByName("layerVisible");
for(var i = 0;i < objLayerVisibleList.length;i++){
if(objLayerVisibleList(i).checked){
if(arrLayerList[i].visible.toString().toLowerCase() == "false"){
boolChange = true;
arrLayerList[i].visible = "true";
}
}else{
if(arrLayerList[i].visible.toString().toLowerCase() == "true"){
boolChange = true;
arrLayerList[i].visible = "false";
}
}
}
if(intPreActiveLayerIndex != intActiveLayerIndex){
boolChange = true;
objSwapItem = arrLayerList[intPreActiveLayerIndex];
arrLayerList[intPreActiveLayerIndex] = arrLayerList[intActiveLayerIndex];
arrLayerList[intActiveLayerIndex] = objSwapItem;
}
if(boolChange){
//4.删除 Group 结点
if(objMapDiv.all.tags("group") && objMapDiv.all.tags("group").length){
objGroupNode = objMapDiv.childNodes(0);
objGroupNode = objMapDiv.removeChild(objGroupNode);
}
//重新定义请求字符串
objSwapCoordinateFeaturesXML = objCoordinateFeaturesXML;
objFeatureNodes = objCoordinateFeaturesXML.selectNodes("//FEATURE");
for(var i = 0;i < objFeatureNodes.length;i++){
arrIndexID = objFeatureNodes(i).getAttribute("layerId");
strVisible = arrLayerList[arrIndexID].visible;
objFeatureNodes(i).setAttribute("visible",strVisible);
}
//f.prompt("objCoordinateFeaturesXML",objCoordinateFeaturesXML.xml);
arcGetMap();
objCoordinateFeaturesXML = objSwapCoordinateFeaturesXML;
//window.prompt("objCoordinateFeaturesXML",objCoordinateFeaturesXML.xml);
}
controlLayerListShow();
}
function showMapTagetFindWin(){// find 窗口
var objFindMapDataTable,objFindTermInput1,objFindTermInput1;
var objFindDialogWinConfirmBtn,objFindDialogWinClearBtn;
var objTableTd,objTableRow;
//1.查询窗口的条件容器 div
objFindMapDataTable = this.document.createElement("<table class = 'findDialogWin_table'>");
objTableRow = objFindMapDataTable.insertRow();
objTableTd = objTableRow.insertCell();
//2.查询窗口条件输入框 input 1
objFindTermInput1 = this.document.createElement("<input class = 'findDialogWin_input'>");
objFindTermInput1 = objTableTd.appendChild(objFindTermInput1);
objTableTd.insertAdjacentHTML("afterBegin","名称(模糊):");
with(objTableTd){
colSpan = 2;
style.wordBreak = "keep-all";
}
/*
//3.查询窗口条件输入框 input 2
objFindTermInput2 = this.document.createElement("<input class = 'findDialogWin_input'>");
objTableRow = objFindMapDataTable.insertRow();
objTableTd = objTableRow.insertCell();
objFindTermInput2 = objTableTd.appendChild(objFindTermInput2);
objTableTd.insertAdjacentHTML("afterBegin","xxxxxxx:");
with(objTableTd){
colSpan = 2;
style.wordBreak = "keep-all";
}
*/
//4.查询按钮
objFindDialogWinConfirmBtn = this.document.createElement("<INPUT type='button' class = 'findDialogWin_query' value = '查询'>");
objTableRow = objFindMapDataTable.insertRow();
objTableTd = objTableRow.insertCell();
objTableTd.style.textAlign = "right";
objFindDialogWinConfirmBtn = objTableTd.appendChild(objFindDialogWinConfirmBtn);
objFindDialogWinConfirmBtn.objFindTermInput1 = objFindTermInput1;
objFindDialogWinConfirmBtn.onclick = arcGeoCodeQuery;
//5.重填按钮
objFindDialogWinClearBtn = this.document.createElement("<INPUT type='button' class = 'findDialogWin_reset' value='取消'>");
objTableTd = objTableRow.insertCell();
objFindDialogWinClearBtn = objTableTd.appendChild(objFindDialogWinClearBtn);
objFindMapDataTable = objDialogWinInnerDiv.appendChild(objFindMapDataTable);
//6.重新设置
with(objDialogWinInnerDiv){
style.pixelWidth = objFindMapDataTable.offsetWidth + 8;
style.pixelHeight = objFindMapDataTable.offsetHeight + 8;
}
//7.重新设置浮动框的显示属性
with(objDialogWinPlaneDiv){
style.pixelWidth = objDialogWinInnerDiv.offsetWidth + 2;
style.pixelHeight = objDialogWinInnerDiv.offsetHeight + objDialogWinTitleDiv.offsetHeight - 2;
style.pixelLeft = objMapDiv.style.pixelWidth/2 - objDialogWinPlaneDiv.offsetWidth/2;
style.pixelTop = objMapDiv.style.pixelHeight/2 - objDialogWinPlaneDiv.offsetHeight/2;
}
objDialogWinTitleDiv.style.pixelWidth = objFindMapDataTable.offsetWidth - objDialogWinTitleCloseButtonDiv.offsetWidth + 9;
with(objDialogWinTitleCloseButtonDiv.style){
pixelLeft = objDialogWinTitleDiv.offsetWidth;
pixelHeight = objDialogWinTitleDiv.offsetHeight - 4;
fontSize = "10pt";
}
objDialogWinPlaneDiv.style.visibility = "visible";
objFindTermInput1.focus();
}
function showSettingWin(){//设置刷新时间窗口
var objTable,objRow,objTD,objInput,objButton;
//1.容器
objTable = this.document.createElement("<table class='findDialogWin_table'>");
objInput = this.document.createElement("<input class='findDialogWin_input'>");
objButton = this.document.createElement("<INPUT style='border:solid 1px;font-size:9pt' type = 'button' value='确定'>");
//2.第一行
objRow = objTable.insertRow();
objTD = objRow.insertCell();
with(objTD){
align = "center";
valign = "middle";
style.fontSize = "9pt";
innerText = "设置刷新时间";
style.workbreak = "keep-all";
}
objInput = objTD.appendChild(objInput);
//3.第二行
objRow = objTable.insertRow();
objTD = objRow.insertCell();
with(objTD){
colSpan = 2;
align = "center";
valign = "middle";
}
objButton = objTD.appendChild(objButton);
//4.把浮动窗口内空添加到浮动窗口
objTable = objDialogWinInnerDiv.appendChild(objTable);
objTable.style.visibility = "visible";
//5.重新设置浮动框的显示属性
with(objDialogWinInnerDiv){
style.width = objTable.offsetWidth + 4;
style.height = objTable.offsetHeight + 4;
}
//
//6.重新设置浮动框的显示属性
with(objDialogWinPlaneDiv){
style.width = objDialogWinInnerDiv.offsetWidth + 2;
//style.height = objDialogWinInnerDiv.offsetHeight + objDialogWinTitleDiv.offsetHeight - 2;
style.height = objDialogWinInnerDiv.offsetHeight + objDialogWinInnerDiv.offsetTop + 2;
style.pixelLeft = objMapDiv.style.pixelWidth/2 - objDialogWinPlaneDiv.offsetWidth/2;
style.pixelTop = objMapDiv.style.pixelHeight/2 - objDialogWinPlaneDiv.offsetHeight/2;
}
objDialogWinTitleDiv.style.pixelWidth = objDialogWinInnerDiv.offsetWidth - objDialogWinTitleCloseButtonDiv.offsetWidth + 2;
objDialogWinTitleCloseButtonDiv.style.pixelLeft = objDialogWinTitleDiv.offsetWidth - 1;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -