62,046
社区成员
发帖
与我相关
我的任务
分享
var map = new BMap.Map("allmap", { minZoom: 5, maxZoom: 5 }); // 创建地图实例 ,禁止缩放
map.centerAndZoom(new BMap.Point(108.95, 34.27), 5); // 初始化地图,设置中心点坐标为西安
map.disableDragging(); //禁止拖拽
var b = new BMap.Bounds(new BMap.Point(73.40, 53.33),new BMap.Point(135.23,3,52));
try {
BMapLib.AreaRestriction.setBounds(map, b);
} catch (e) {
alert(e);
}