自适应显示多个点标记
html, body, #container {
height: 100%;
width: 100%;
}
.amap-icon img{
width: 25px;
height: 34px;
}
地图自适应
var map = new AMap.Map('container', {
resizeEnable: true,
center: [116.397428, 39.90923],
zoom: 13
});
map.clearMap(); // 清除地图覆盖物
var markers = [{
icon: '//a.amap.com/jsapi_demos/static/demo-center/icons/poi-marker-1.png',
position: [116.205467, 39.907761]
}, {
icon: '//a.amap.com/jsapi_demos/static/demo-center/icons/poi-marker-2.png',
position: [116.368904, 39.913423]
}, {
icon: '//a.amap.com/jsapi_demos/static/demo-center/icons/poi-marker-3.png',
position: [116.305467, 39.807761]
}];