@{
    ViewBag.Title = "查看地图";
    Layout = "~/Views/Shared/_LayoutTable.cshtml";
}
@section head{
    <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>
    <script type="text/javascript">
        var map = new BMap.Map("allmap");
        var point = new BMap.Point("@ViewBag.X", "@ViewBag.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());      //添加地图类型控件
        var marker1 = new BMap.Marker(point);
        map.enableScrollWheelZoom();                    //启用滚轮放大缩小
    </script>
</body>