250-AMap.InfoWindow 高德地图信息窗体关闭后的回调

洲行

关注

阅读 14

2024-01-10

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);
})

精彩评论(0)

0 0 举报