百度地图API JavaScript显示人员分布信息
效果图贴下:
js代码贴下:
<body>
<div ,function(){
var infoWindow = new BMap.InfoWindow(content,opts);
this.openInfoWindow(infoWindow,pt);
//图片加载完毕重绘infowindow
document.getElementById('imgDemo').onload = function (){
infoWindow.redraw(); //防止在网速较慢,图片未加载时,生成的信息框高度比图片的总高度小,导致图片部分被隐藏
}
});
}
}
}
}
});
}
});
</script>
有兴趣的可以参考百度API文档学习:http://developer.baidu.com/map/jsdemo.htm