var map = new BMap.Map(\"大众allmap\"大众);

map.centerAndZoom(new BMap.Point(116.4035,39.915), 14);

var bs = map.getBounds(); //获取可视区域

html百度地图javascript动态获取百度地图中间点坐标 Angular

var bssw = bs.getSouthWest(); //可视区域左下角

var bsne = bs.getNorthEast(); //可视区域右上角

//alert(\"大众当前舆图可视范围是:\"大众 + bssw.lng + \"大众,\"大众 + bssw.lat + \"大众到\公众 + bsne.lng + \"大众,\"大众 + bsne.lat);

var pt = bs.getCenter(); //获取舆图中央点

//根据中央点坐标添加弹跳动画marker

var point = new BMap.Point(pt.lng, pt.lat);

var marker = new BMap.Marker(point); // 创建标注

map.addOverlay(marker);// 将标注添加到舆图中

marker.setAnimation(BMAP_ANIMATION_BOUNCE);