var infoWindow2 = new AMap.InfoWindow({
content: infoWindowContent,
offset: [50,-60],
closeWhenClickMap:true,
// autoMove:false,
/*close:function (){
console.log("infoWindow2.close")
windowMap.get(parseInt(id)).open();
}*/
});
let p = new AMap.LngLat(extData.longitude,extData.latitude);
infoWindow2.on("close",()=>{
let w = windowMap.get(parseInt(wid))
w.open(map,p);
})
infoWindow2.open(map,p);
关键代码为:
infoWindow2.on("close",()=>{
let w = windowMap.get(parseInt(wid))
w.open(map,p);
})
标签:infoWindow2,地图信息,windowMap,窗体,AMap,parseInt,close,InfoWindow,open
From: https://blog.51cto.com/u_14816966/9184582