<%@ page language="C#" autoeventwireup="true" inherits="fclp_map, ZKCMS" enableviewstatemac="false" enableEventValidation="false" viewStateEncryptionMode="Never" %>
<%@ Register TagName="meta" TagPrefix="UC" Src="~/s/include/meta.ascx" %>
<%@ Register TagName="head" TagPrefix="UC" Src="~/s/include/head.ascx" %>
<%@ Register TagName="tip_bar_time" TagPrefix="UC" Src="~/s/include/tip_bar_time.ascx" %>
<%@ Register TagName="foot" TagPrefix="UC" Src="~/s/include/foot.ascx" %>
<%@ Register TagName="fclp_head" TagPrefix="UC" Src="~/fclp/head.ascx" %>
<!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 runat="server">
    <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
    <meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
    <title><%=lpName %>地图位置_<%=ZK.config("fclptitle")%></title>
    <meta name="keywords" content="<%=ZK.config("fclpkeywords") %>" />
    <meta name="description" content="<%=ZK.config("fclpdescription") %>" />
    <UC:meta ID="meta1" runat="server" />
    <link type="text/css" rel="stylesheet" href="/fclp/skin/fclp.css" />
</head>
<body>
    <div class="wrap">
        <a name="pagetop" id="pagetop"></a>
        <UC:head ID="head1" runat="server" />
        <div class="box">
            <div class="tip_bar mt5">
                <table width="100%" border="0" cellspacing="0" cellpadding="0">
                    <tr>
                        <td>
                            <div class="path"><strong>您当前的位置：</strong><span><a href="/">网站首页</a></span><span><a href="/fclp/">房产楼盘</a></span><%=lpName %></div>
                        </td>
                        <td align="right"><UC:tip_bar_time ID="tip_bar_time1" runat="server" /></td>
                    </tr>
                </table>
            </div>
        </div>
        <div class="box">
            <div class="fclp_view">
                <UC:fclp_head ID="fclp_head1" runat="server" />
                <div class="c1 mt5">
                    <div class="b">
                        <div class="fl"></div>
                        <div class="con">在线地图</div>
                        <div class="fr"></div>
                        <div class="clear"></div>
                    </div>
                    <div class="v">
                        <div class="self_map">
                            <style type="text/css"> .self_map{padding:8px 0 8px 8px;}.iw_poi_title{color:#CC5522;font-size:14px;font-weight:bold;overflow:hidden;padding-right:13px;white-space:nowrap;}.iw_poi_content{font:12px arial,sans-serif;overflow:visible;padding-top:4px;white-space:-moz-pre-wrap;word-wrap:break-word;}</style>
                            <script type="text/javascript" src="http://api.map.baidu.com/api?key=&v=1.1&services=true"></script>
                            <div style="width: 930px; height: 600px; border: #ccc solid 1px;" id="dituContent"></div>
                            <script type="text/javascript">
                                //创建和初始化地图函数：
                                function initMap(){
                                    createMap();//创建地图
                                    setMapEvent();//设置地图事件
                                    addMapControl();//向地图添加控件
                                }
                                
                                //创建地图函数：
                                function createMap(){
                                    var map = new BMap.Map("dituContent");//在百度地图容器中创建一个地图
                                    var point = new BMap.Point(<asp:Literal ID="Literal3" runat="server"></asp:Literal>);//定义一个中心点坐标
                                    map.centerAndZoom(point,17);//设定地图的中心点和坐标并将地图显示在地图容器中
                                    window.map = map;//将map变量存储在全局
                                    
                                    
                                         //<<
                            var CON_width=250;var CON_height=70;var CON_title="<%=lpName %>";var CON_content="<asp:Literal ID="Literal3__" runat="server"></asp:Literal>";

                            var marker = new BMap.Marker(point);
                            var opts = {
                              width : CON_width,     // 信息窗口宽度
                              height: CON_height,     // 信息窗口高度
                              title : "<strong>"+CON_title+"</strong>"  // 信息窗口标题
                            }
                            map.addOverlay(marker);

                            if(CON_title!=""){
                            var infoWindow = new BMap.InfoWindow(CON_content, opts);  // 创建信息窗口对象
                            marker.addEventListener("click", function(){          
                               this.openInfoWindow(infoWindow);  
                            });
                            }

                            map.openInfoWindow(infoWindow, map.getCenter());      // 打开信息窗口

                             setTimeout(function(){
                                map.panTo(new BMap.Point(<asp:Literal ID="Literal3_" runat="server"></asp:Literal>));
                              }, 1000);
                              
                                    //>>
                                    
                                }
                                
                                //地图事件设置函数：
                                function setMapEvent(){
                                    map.enableDragging();//启用地图拖拽事件，默认启用(可不写)
                                    map.enableScrollWheelZoom();//启用地图滚轮放大缩小
                                    map.enableDoubleClickZoom();//启用鼠标双击放大，默认启用(可不写)
                                    map.enableKeyboard();//启用键盘上下左右键移动地图
                                }
                                
                                //地图控件添加函数：
                                function addMapControl(){
                                    //向地图中添加缩放控件
                                var ctrl_nav = new BMap.NavigationControl({anchor:BMAP_ANCHOR_TOP_LEFT,type:BMAP_NAVIGATION_CONTROL_LARGE});
                                map.addControl(ctrl_nav);
                                    //向地图中添加缩略图控件
                                var ctrl_ove = new BMap.OverviewMapControl({anchor:BMAP_ANCHOR_BOTTOM_RIGHT,isOpen:0});
                                map.addControl(ctrl_ove);
                                    //向地图中添加比例尺控件
                                var ctrl_sca = new BMap.ScaleControl({anchor:BMAP_ANCHOR_BOTTOM_LEFT});
                                map.addControl(ctrl_sca);
                                }
                                
                                
                                initMap();//创建和初始化地图
                            </script>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <UC:foot ID="foot1" runat="server" />
    </div>
</body>
</html>
