我希望在两个坐标的显示信息窗体。代码:let positions = [[118.915171,32.12761],[118.915171,32.12531]]; for(let i=0;i<positions.length;i++){ let marker = new AMap.Marker({ position:positions[i], }); marker.setMap(this.map); //为marker指定目标显示地图。 let info = new AMap.InfoWindow({ content:'<div>高德地图</div>', offset:new AMap.Pixel(0,-28), size:new AMap.Size(200,0) }); info.open(this.map,positions[i]); }; } 问题:为什么只显示一个信息窗体?
添加回答
举报
0/150
提交
取消