<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Frm_BaiDu_AttDetaList.aspx.cs" Inherits="AndroidSevice.Web.BBCX.Frm_BaiDu_AttDetaList" %>

<!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 id="Head1" runat="server">
    <title>百度地图定位显示</title>
    <%--单人统计一个点--%>
</head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="initial-scale=1.0, user-scalable=no" />
<script type="text/javascript" src="http://api.map.baidu.com/api?v=2.0&ak=8cb299725cff45869425b1bbdae988aa"></script>
<style type="text/css">
        body, html, #allmap
        {
            width: 100%;
            height: 100%;
            overflow: hidden;
            margin: 0;
        }
        #l-map
        {
            height: 100%;
            width: 78%;
            float: left;
            border-right: 2px solid #bcbcbc;
        }
        #r-result
        {
            height: 100%;
            width: 20%;
            float: left;
        }
    </style>
<body>
    <div id="allmap">
    </div>
</body>
</html>

<script type="text/javascript">
    var map = new BMap.Map("allmap");
    var point = new BMap.Point("<%=x %>", "<%=y %>");
    map.centerAndZoom(point, 13);                   // 初始化地图,设置中心点坐标和地图大小级别
    map.addOverlay(new BMap.Marker(point));         // 给该坐标加一个红点标记
    map.addControl(new BMap.NavigationControl());   // 添加平移缩放控件
    map.addControl(new BMap.ScaleControl());        // 添加比例尺控件
    map.addControl(new BMap.OverviewMapControl());  //添加缩略地图控件
    map.addControl(new BMap.MapTypeControl());      //添加地图类型控件
    map.enableScrollWheelZoom();                    //启用滚轮放大缩小
    var marker1 = new BMap.Marker(point);
    map.addOverlay(marker1);
    var label = new BMap.Label("<%=somesay %>", { offset: new BMap.Size(20, -10) });
    marker1.setLabel(label);
    var infoWindow1 = new BMap.InfoWindow("<%=somesay %>");
    marker1.addEventListener("click", function () { this.openInfoWindow(infoWindow1); });
</script>
