leaflet同时打开多个pop
  1. //{autoClose:false,closeOnClick: false}
  2. let pointMark = L.marker([item.wd, item.jd], { icon: Icon }).addTo(mymap)
  3. .bindPopup('This is a popup!',{autoClose:false,closeOnClick: false})
  4. .openPopup();

同时关闭多个pop
  1. // 关闭气泡
  2. closePopup() {
  3. let that = this
  4. let iterations = 0;
  5. let interval = setInterval(foo, 100);
  6. function foo() {
  7. iterations++;
  8. if(!$(".leaflet-popup-close-button")[0]){
  9. clearInterval(interval)
  10. return
  11. }
  12. $(".leaflet-popup-close-button")[0].click();
  13. if (iterations >= that.popupLength){
  14. that.closePopup()
  15. clearInterval(interval)
  16. }
  17. }
  18. },