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

📄 mapform.asp

📁 1985498mapxtremeforaspdemo.rar
💻 ASP
📖 第 1 页 / 共 2 页
字号:
<%@ LANGUAGE = VBScript %>
<% Option Explicit %>
<!--#INCLUDE FILE="..\lib\miConst.asp"-->
<!--#INCLUDE FILE="..\lib\miMapEngine.asp"-->
<!--#INCLUDE FILE="..\lib\miErrorSystem.asp"-->
<!--#INCLUDE FILE="..\lib\miUtilities.asp"-->
<!--#INCLUDE FILE="app_const.asp"-->
<!--#INCLUDE FILE="application.asp"-->

<%
Const c_MapPage = "Map Page"

' Caption above the set of radio buttons:
Const c_ClickOnTheMapTo = "Click on the map to:"

' labels on radio buttons, etc.
Const c_ZoomIn = "放大"
Const c_ZoomOut = "缩小"
Const c_Center  = "居中"
Const c_MapWidth = "Map width:"
Const c_Miles = " miles"
Const c_Apply = "更新地图"

' the text for the link to the debugpage.
Const c_DebugMessage = "Display map engine's state information"
%>

<%
' Define general-purpose variables for receiving values from function calls
Dim bResult
Dim numValue
Dim numValue2
Dim strMapPath
Dim VirtualDir
Dim strFile
Dim strValue
Dim strTemp
Dim strZoom

'***************************************************************************
' Call a routine from application.asp to obtain & initialize a map.
If Not PrepareMapEngine() Then
	Response.Redirect "busy.asp"
End If


'GetFormFields

'bResult = CommandHandler()

If Len(Session(SESN_IMAGEPATH)) > 0  Then
	'We've already created a unique file name during this session;
	'so before we create a new .GIF, delete the old one.
	strFile = Session(SESN_ABSMAPPATH) & Session(SESN_IMAGEPATH)
	bResult = DeleteFiles(strFile)
End If

'Generate a new, unique file name, ending in ".GIF"
strFile = CreateUniqueExportFileName()
strFile = strFile & Session(SESN_MAPFILEEXT)
Session(SESN_IMAGEPATH) = strFile

'Build a physical path to the .GIF file, such as:
'   "C:\inetpub\wwwroot\mapimage\filename.gif"
strMapPath = Session(SESN_ABSMAPPATH) & strFile

'Build a relative path to the .GIF file, such as "/MAPIMAGE/filename.gif"
VirtualDir = Session(SESN_RELMAPPATH) & strFile

' Export the map to the temporary file.
ExportMapToFile Session(SESN_MAPFILETYPE), strMapPath

' If there was an error during the export operation, display an error page.
If HaveError() Then
  Response.Redirect "busy.asp"
End If

' Round off extra decimal places before we display the zoom distance on the form.
'bResult = GetMapZoom(numValue)
'strZoom = Round(numValue, 2)
%>
<html>

<meta http-equiv="Content-Type" content="text/html; charset=GB2312">

<HEAD>
<TITLE>Default Form</TITLE>
<SCRIPT language=javascript>
	var szLastVariant;
	var szUserName = ""
	var szUserPWD = ""
	var szUserCorp = ""
	var szProcessUrl = "";

	function oprtFinalSubmit( param )
	{
		szLastVariant = param;
		param += "&HirerHref=http://" + self.location.hostname;
	}

	function oprtMapEngineProcessed()
	{
		var frmMappage = parent.__GetMappage__();
		var js_Return = "" ; 
		frmMappage.commAnalyzeJsReturn( js_Return );
		frmMappage.mappageReset();
	}

	function oprtViewMapState()
	{
		var frmMappage = parent.__GetMappage__();
		var dblZoom = frmMappage.aryHiddenParam[0].split("=")[1];
		var dblCx = frmMappage.aryHiddenParam[1].split("=")[1];
		var dblCy = frmMappage.aryHiddenParam[2].split("=")[1];
		formCode.txtMapState.value = dblCx + "," + dblCy + "," + dblZoom + "\n";
		formCode.txtMapState.focus();
		formCode.txtMapState.select();
	}

	function oprtViewJsReturn()
	{
		var frmMappage = parent.__GetMappage__();
		var js_Return = GetAllParam();
		formCode.txtJsReturn.value = js_Return.replace(/!!/g, "\n") + "\n";
		formCode.txtJsReturn.focus();
		formCode.txtJsReturn.select();
	}

	function oprtViewLastVariant()
	{
		formCode.txtVariant.value = szLastVariant.replace(/&/g, "\n") + "\n";
		formCode.txtVariant.focus();
		formCode.txtVariant.select();
	}
</SCRIPT>

<SCRIPT TYPE="text/javascript" LANGUAGE="JavaScript">
function isReqing()
{
	parent.mapframe.isReqing=true;
}

//移动到某点
function lTP(scx, scy) 
{
	document.forms[0].centerx.value=scx;
	document.forms[0].centery.value=scy;
	document.forms[0].workmode.value='0';
	document.forms[0].submitbutton.click();
}	
		
function OTest() 
{
	document.theImage2.src=document.forms[0].VirtualDir.value;
}

var tdelay,ncount;
function delay(nsec)
{
	ncount=0;
	tdelay=window.setInterval('perDelay()',nsec);
}

function perDelay()
{
	if (ncount<=100) 
	{
		ncount++;
	}
	else
	{
		ncount = 0;
		window.clearInterval(tdelay);
		chgimg1();
	}
}

		
function chgimg()
{
	parent.nload++;
	if(parent.nload==1)
	{
		if(parent.mapframe.loaded==false) delay(50);
		else delay(20);
	}
	else chgimg1();
}

function chgimg1()
{
	var zoom,x1,y1,x2,y2,xc,yc,factor,ix,iy,src;
	var tmpval;
	var tfrm = document.forms[0];
	tmpval=tfrm.QueryResult.value;
	src = tfrm.VirtualDir.value;

	parent.mapframe.lcChangeImgSrc(src);
	parent.mapframe.isReqing=false;
	parent.mapframe.lcHideLayer("layLoading");

	parent.mapframe.openNum = parent.mapframe.openNum +1;
	if(parent.mapframe.openNum==1)
	{
		parent.mapframe.SecStr = tmpval; //-子类
	}

	//--重设图片大小
	tfrm.miFrmMapWidth.value=String(parent.mapframe.MapPicWidth);
	tfrm.miFrmMapHeight.value=String(parent.mapframe.MapPicHeight);
	zoom = parseFloat( tfrm.lastzoom.value);
	xc   = parseFloat( tfrm.centerx.value);
	yc   = parseFloat( tfrm.centery.value);
	ix   = parseFloat( tfrm.miFrmMapWidth.value);
	iy   = parseFloat( tfrm.miFrmMapHeight.value);

	factor=zoom/ix;
	x1=xc-zoom*0.5;
	x2=xc+zoom*0.5;
	parent.mapframe.xDistance = zoom;
	parent.mapframe.szMapZoom = zoom;// -wsd add
	parent.mapframe.eLeft     = x1;
	parent.mapframe.eRight    = x2;
	zoom=zoom*iy/ix;

⌨️ 快捷键说明

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