<!--#include file="../inc/config.asp"-->
<!--#include file="../inc/conn.asp"-->
<!--#include file="../inc/function.asp"-->
<%
dim id,UserName,MapX,MapY,MapZ,Address
if(request.QueryString("id")<>"") then
	id=Clng(request.QueryString("id"))	
else
	id=0
end if
if(id>0) then
	set rs_m=server.CreateObject("adodb.recordset") 
	d_sql="select UserName,Address,MapX,MapY,MapZ from t_member where id="&id
	rs_m.open d_sql,conn,3,1
	if not rs_m.eof then
		UserName=rs_m("UserName")
		Address=rs_m("Address")
		MapX=rs_m("MapX")
		MapY=rs_m("MapY")
		MapZ=rs_m("MapZ")
		rs_m.close
		set rs_m=nothing
	else
		response.Write("error")
		rs_m.close
		set rs_m=nothing
		response.End()
	end if
%>
<!DOCTYPE html PUBliC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title><%=UserName%>-标注地图-<%=SiteUrl%></title>
<meta content="标注地图-<%=UserName%>" name=Description>
<meta content="标注地图-<%=UserName%>" name=Keywords>
<link href="../style/global.css" rel="stylesheet" type="text/css" />
<link href="style/list.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="/js/common.js"></script>
<script language="javascript" src="http://api.51ditu.com/js/maps.js"></script>
<script language="javascript" src="http://api.51ditu.com/js/ezmarker.js"></script>
<style type="text/css">
<!--
.s1 {}
-->
</style>
</head>

<body>
<!--#include file="../head.asp"-->
<script type="text/javascript">htab( 5 ,2,5);</script>
<%
dim act
act=request.QueryString("act")
if(act="do") then
	if(request.QueryString("MapX")<>"") then
		MapX=Clng(request.QueryString("MapX"))
	else
		MapX=0
	end if
	if(request.QueryString("MapY")<>"") then
		MapY=Clng(request.QueryString("MapY"))
	else
		MapY=0
	end if
	if(request.QueryString("MapZ")<>"") then
		MapZ=Clng(request.QueryString("MapZ"))
	else
		MapZ=0
	end if
	set rs=server.CreateObject("adodb.recordset") 
	rs.open "select * from t_member where id="&id,conn,3,3
	rs("MapX")=MapX
	rs("MapY")=MapY
	rs("MapZ")=MapZ
	rs.update
	rs.close
	set rs=nothing
	response.Write("<script>alert('成功标注.');location.href='http://www.jntao.com/company/detail_"&id&".html';</script>")
else
%>
<div class="br"></div>
<table width="960"  border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td><div class="right"><a href="/info/publish.asp?pid=<%=pid%>&cid=<%=cid%>" style="color:red; line-height:24px; font-weight:bold;">点此发布信息-&gt;</a></div>
    <div class="position">当前位置：<a href="/">首页</a>&gt;<a href="/company/">济南商户</a>&gt;<a href="http://www.jntao.com/company/detail_<%=id%>.html"><%=UserName%></a>&gt;标注位置</div></td>
  </tr>
</table>
<table width="960" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#f5f5f5">
  <tr>
    <td height="32" align="center"><h2><a href="http://www.jntao.com/company/detail_<%=id%>.html"><%=UserName%></a></h2></td>
  </tr>
  <tr>
    <td height="200" align="center" bgcolor="#FFFFFF">
    <p><a href="http://www.jntao.com/company/detail_<%=id%>.html">地址：<%=Address%></a></p>
    <form action="imap.asp" name="mapForm" id="mapForm" method="get">
    <input type="hidden" name="MapX" id="MapX" value="<%=MapX%>">
    <input type="hidden" name="MapY" id="MapY" value="<%=MapY%>">
    <input type="hidden" name="MapZ" id="MapZ" value="<%=MapZ%>">
    <input type="hidden" name="act" value="do" />
    <input type="hidden" name="id" value="<%=id%>" />
    <script language="JavaScript">
    <!--
        //setMap是ezmarker内部定义的接口，这里可以根据实际需要实现该接口 
        function setMap(point,zoom)
        {
          document.getElementById("MapX").value=point.getLongitude();
          document.getElementById("MapY").value=point.getLatitude();
          document.getElementById("MapZ").value=zoom;
          //ezmarker.setButtonImage("/images/updataMap.jpg");
          document.getElementById('MapResult').innerHTML='<span style="color:red;">成功标注!</span>';
					document.mapForm.submit();
        }
    
        var ezmarker = new LTEZMarker("pos");
        ezmarker.setDefaultView('jinan',2);
        ezmarker.setPlaceList(false);//在地图上显示快速定位控件
        LTEvent.addListener(ezmarker,"mark",setMap);//"mark"是标注事件
      
    //-->
    </script>
    <span id="MapResult"></span>
    </form>
    <p style="margin:5px 20px; line-height:20px; color:#999; text-align:left;">&nbsp;</p>
    <p style="margin:5px 20px; line-height:20px; color:#999; text-align:left;"><strong>提示</strong>：点击&ldquo;标注位置&rdquo;图片按钮，在新弹出的电子地图窗口中，鼠标拖动地图到您要标注的位置，点击地图下面的&ldquo;在地图上标注位置&rdquo;按钮，这时鼠标为变成&ldquo;图钉&rdquo;形状，在地图要标注的位置，点击鼠标左键，提示是否&ldquo;保存位置&rdquo;，点击确定即可。</p></td>
  </tr>
</table>
<%
end if
%> 
<!--#include file="../root.asp"-->
</body>
</html>
<%
end if
call connclose()
%>
