//========================================================================
//SuperMap IS 客户端程序,版权所有，北京超图地理信息技术有限公司，1999-2003。
//本程序只能在有效的授权许可下使用。未经许可，不得以任何手段擅自使用或传播。
//作者：	陈朝晖
//修改： 张继南
//文件名:	SMMapFunction.js
//功能:		IS功能函数，用户开发只需调用该功能即可实现
//最后修改时间:	2003-4-10
//========================================================================


//**************空间源信息获取功能函数**********************
//	函数定义：GetMapMetaInfo(strCMD)
//  参数含义：strCMD为要执行的命令类型，包括
//            "DSRCLIST"  --   数据源列表
//            "LAYERLIST" --   数据集列表
//            "DSINFO"    --   数据源信息
//            "LAYERINFO" --   图层信息
//            "DTINFO"    --   数据集信息
//	作    用：从服务器端获取相关信息，这里显示的格式为开窗
//            显示，用户可以按照需求自主创建现示的形式
//**********************************************************

function GetMapMetaInfo(strCMD)
{
	var strFeature="height=360,width=500,status=no,toolbar=no,resizable=no,menubar=no,location=no,scrollbars=yes";
	var strRandom=Math.round(10000*Math.random()).toString();

	var aWin = window.open("","数据描述列表",strFeature);
	var strAddress="";
	strAddress="mapview.jsp?CMD=" + strCMD + 
				"&APP=" + parent.FrameMapViewImage.P_APP + 
				"&SMWS=" + parent.FrameMapViewImage.P_SMWS + 
				"&MAP=" + parent.FrameMapViewImage.P_MAP + 
				"&IP=" + parent.FrameMapViewImage.P_IP + 
				"&PORT=" + parent.FrameMapViewImage.P_PORT + 
				"&USERID=" + parent.FrameMapViewImage.P_USERID+
				"&RANDOM=" + strRandom;  //保证每次请求的字符串不一样，强制刷新页面
	aWin.document.open();
	aWin.document.write("<html>");
	aWin.document.write("<head>");
	aWin.document.write("<meta http-equiv='Content-Type' content='text/html; charset=gb2312'>");
	aWin.document.write("<META HTTP-EQUIV='Pragma' CONTENT='no-cache'>"); 
	aWin.document.write("<META HTTP-EQUIV='Cache-Control' CONTENT='no-cache'>"); 
	aWin.document.write("<META HTTP-EQUIV='Expires' CONTENT='0'>"); 
	aWin.document.write("<title>数据描述列表</title>");
	aWin.document.write("</head>");
	aWin.document.write("<BODY onload=document.location='");
	aWin.document.write(strAddress);
	aWin.document.write("'>");
	aWin.document.write("<script language=javascript>");
	aWin.document.write("</script>");
	aWin.document.write("</BODY>");
	aWin.document.write("</html>");
	aWin.document.close();

}

function ShowMapMetaInfo()
{
var inforHTML;
inforHTML = "<p><font size=2><a href=javascript:GetMapMetaInfo('DSRCLIST')>数据源列表</a><br><a href=javascript:GetMapMetaInfo('LAYERLIST')>图层列表</a><br><a href=javascript:GetMapMetaInfo('DSINFO')>数据源信息</a><br><a href=javascript:GetMapMetaInfo('LAYERINFO')>图层信息</a><br><a href=javascript:GetMapMetaInfo('DTINFO')>数据集信息</a><br></font></p>";
parent.FrameMessage.MessageBox.innerHTML = inforHTML;

}