"; var map = new BMap.Map("container"); var point = new BMap.Point(113.457735,23.339493); var marker = new BMap.Marker(point); var infoWindow = new BMap.InfoWindow(sContent); // 创建信息窗口对象 map.enableScrollWheelZoom(); // 启用滚轮放大缩小。 map.addControl(new BMap.NavigationControl()); //大小,放大的鱼骨 map.centerAndZoom(point, 18); map.addOverlay(marker); marker.addEventListener("click", function(){ this.openInfoWindow(infoWindow); //图片加载完毕重绘infowindow document.getElementById('imgDemo').onload = function (){ infoWindow.redraw(); } }); map.openInfoWindow(infoWindow, map.getCenter()); // 自动打开信息窗口