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

📄 eagle.js

📁 1985498mapxtremeforaspdemo.rar
💻 JS
字号:
var ovNo=0;
var locLeft;
var locTop ;
var locHeight = 85;
var locWidth = 85;
var i2Width = locWidth;    //--程序概图片大小
var	i2Height = locHeight;
var	ovImageSrc = "images/ovimage1.gif";

var fullLeft =  494000;  //eLeft;
var fullRight = 505050;  //eRight;
var fullTop =     3512050;  //eTop;
var fullBottom =  3501000; //eBottom;
var ovIsVisible=false;

//-全图
function mtSumbitViewEntireLayer(nview)
{
	if (nview==1)
	{
		eRight = 506000;
		eLeft  = 493000;
		eTop   = 3513000;
		eBottom= 3503000;
	}
	if (nview==2)
	{
		eRight = 541500;
		eLeft  = 482400;
		eTop   = 3520000;
		eBottom= 3460900;
	}
	
	sendToServer();
}

function setFullExt()
{
	if (eLeft<494500 || eRight>503000 || eTop>3515000 || eBottom<3502500) ovNo=1;
	else ovNo=0;

	switch(ovNo)
	{
		case 0:  //城区范围
			fullLeft =  494000;  //eLeft;
			fullRight = 505050;  //eRight;
			fullTop =     3512050;  //eTop;
			fullBottom =  3501000; //eBottom;
			document.all.ovImage.src="images/ovimage0.gif"
			break;
		case 1:  //全市范围
			fullLeft =  482400;  //eLeft;
			fullRight = 541500;  //eRight;
			fullTop =   3520000;  //eTop;
			fullBottom =3460900; //eBottom;
			document.all.ovImage.src="images/ovimage1.gif"
			break;
	}
}


function createEagle()  //-实现鹰眼功能
{
	var zoomBoxColor = '#ff0000';
	locLeft = MapPicLeft;
	locTop = MapPicTop;
		
	//-上浮层
	content = '<img name="ovImage" src="images/ovimage0.gif" border=1 width=' + locWidth + ' height=' + locHeight +'>';
	lcCreateLayer("ovLayer",locLeft,locTop,(locWidth),(locHeight),true,content);

	// 拖框层 - 用于放大、缩小等
	content = '<table bordercolor="red" border="2" width="100%" height="100%"><tr><td></td></tr></table>';
	lcCreateLayer( "ovRect",locLeft,locTop,1,1,true,content );
	ovIsVisible = true;
}


function clipLayer(name, clipleft, cliptop, clipright, clipbottom) 
{
	var layer = lcGetLayer(name);
	var newWidth = clipright - clipleft;
	var newHeight = clipbottom - cliptop;
	layer.height = newHeight;
	layer.width	= newWidth;
	layer.top	= cliptop  + "px";
	layer.left	= clipleft + "px";
}


		
function setLayerBackgroundColor(name, color) 
{		
  	var layer = lcGetLayer(name);		
	layer.backgroundColor = color;
}


// get coordinates on ov map and reset display
function ovMapClick(mouseX,mouseY) 
{
	var cx,cy;
	cx = (mouseX-locLeft)/locWidth*(fullRight-fullLeft)+fullLeft;
	cy = fullTop - (mouseY-locTop) /locHeight*(fullTop-fullBottom);
	mapSetCenter(cx,cy);
}


// plot extent box on overview map - only for Overview if in OverviewFrame
function putExtentOnOVMap() 
{
	setFullExt();
	var ovBorderWidth=0;
	var ovExtentBoxSize=4;
	var fullWidth = fullRight-fullLeft;
	var fullHeight = fullTop - fullBottom;
	var ovXincre = fullWidth / locWidth;
	var ovYincre = ovXincre ; //fullHeight / locHeight;

	var vleft = (eLeft - fullLeft) /ovXincre + ovBorderWidth;
	var vright = (eRight - fullLeft) / ovXincre + ovBorderWidth;
	var vtop = (fullTop - eTop) / ovYincre + ovBorderWidth;
	var vbottom = (fullTop - eBottom) / ovYincre + ovBorderWidth;
	vleft   =parseInt(vleft + locLeft);
	vright  =parseInt(vright+ locLeft);
	vtop    =parseInt(vtop +  locTop);
	vbottom =parseInt(vbottom+ locTop);
	if (vtop < locTop) vtop=locTop;
	if (vtop > locTop+ locHeight) vtop=locTop+ locHeight;

	if (vbottom < locTop) vbottom=locTop;
	if (vbottom > locTop+ locHeight) vbottom=locTop+ locHeight;

	if (vleft < locLeft ) vleft=locLeft;
	if (vleft > locLeft+locWidth ) vleft=locLeft+locWidth;

	if (vright < locLeft ) vright=locLeft;
	if (vright > locLeft+locWidth ) vright=locLeft+locWidth;
	lcResizeLayer('ovRect',vright-vleft,vbottom-vtop);
	lcMoveLayer('ovRect',vleft,vtop);
}


function mtSetEagle()
{
	if (ovIsVisible)
	{
		lcHideLayer( "ovRect");
		lcHideLayer( "ovLayer");
		ovIsVisible=false;
	}
	else
	{
		lcShowLayer( "ovRect");
		lcShowLayer( "ovLayer");
		ovIsVisible=true;
	}
}


function ChangePicSize()
{
	MapPicWidth =PageWidth-800 + MapPicWidth0;
	MapPicHeight=PageHeight-600+ MapPicHeight0; 
	with(document.all)
	{
		 if( PageWidth>=MinWidth&&PageHeight>=MinHeight&&PageWidth<=MaxWidth&&PageHeight<=MaxHeight)
		 {
			MapPicture.style.width=MapPicWidth;
			MapPicture.style.height=MapPicHeight;

			var temp1=parseFloat(MapPicture.style.width);
			MapHistory.style.pixelLeft=MapPicLeft+temp1-87;
			layerOutput.style.pixelLeft=MapPicLeft+temp1+17+10;

			var temp2=parseFloat(layerOutput.style.width);
			temp1=parseFloat(layerOutput.style.pixelLeft);
			TextHistory.style.pixelLeft=temp1+temp2-87;
			temp1=PageHeight-600;
			layerOutput.style.height=temp1+480; //wsd ch
			ScrollBar.style.height=MapPicHeight-190;
	
			lcResetLayerAfterResizeImg( MapPicWidth, MapPicHeight );
			lcResetLayerBar( MapPicWidth, MapPicHeight );
			lcResetLayerLoading(MapPicLeft,MapPicTop,MapPicWidth,MapPicHeight);
	
			return 1;
		}
		else {alert("只支持800X600以上、2000x1500以下分辨率!");return false;}
	}
}

function is_digital(Item, ItemCaption)
{
	var pattern = /^([0-9])+$/;
	flag = pattern.test(Item.value);
		if(!flag) { alert("输入的"+ItemCaption + "非数字。");Item.focus();
		return (false);
		}
	else return 1;
}


function ShowAdvanceItem()
{
	if (document.all.AdvanceItem.style.display=="none")
	{
		document.all.AdvanceItem.style.display="";
	}
	else document.all.AdvanceItem.style.display="none";
}

function CloseAdvanceItem()
{
	document.all.AdvanceItem.style.display='none';
}

function CloseStartEndSelect()
{
	document.all.StartEndSelect.style.display='none';
}

function ShowStartEndSelect()
{
	document.all.StartEndSelect.style.display='';
}

function publicInfo()
{
	var win = open("info/index.asp","信息板","top=20,left="+(PageWidth-212)+  ",width=210,height=600, scrollbars=no,resizable=no");
	win.focus();
}

function claimInfo()
{
	
}

function helpInfo()
{
	var win = open("helpIndex.htm","使用帮助","top=20,left="+(PageWidth-212)+  ",width=210,height=600, scrollbars=Yes,resizable=Yes,ttoolbar=yes,menubar=yes");
	win.focus();
}


function restImg(imgN,chn)
{
	var img = eval( 'document.all.' + imgN);
	switch(chn)
	{
		case 0:
			img.src = "images\\" + imgN + ".gif";
			break;

		case 1:
			img.src = "images\\" + imgN + "1.gif";
			break;

		case 2:
			img.src = "images\\" + imgN + "2.gif";
			break;
	}
}

⌨️ 快捷键说明

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