代码
var map = new BMap.Map('map');
// 地图加载事件需要在 centerAndZoom 之前监听
map.addEventListener('onload', function () {
document.querySelector('#text').innerText = '地图加载完成!';
});
map.centerAndZoom(new BMap.Point(116.404, 39.928), 15);
map.enableScrollWheelZoom(true);
预览