[OpenLayers-Users] Vector layer refresh - Popup will not close

Wayne Dyck wayne at platoscave.net
Wed May 20 15:49:05 EDT 2009


Thanks, Alexandre. What I ended up doing was checking the popups array
and if there was anything in it then remove the popup like so,

  if (map.popups.length == 1) {
    map.removePopup(map.popups[0]);
  }

I only have one marker and therefore only one popup which can be open.

I can going to try and similar technique on a vector layer which uses
clustering strategy. For some reason I discovered that if you zoom the
map with a popup open you can't close it any more. It's the same error
message, "Invalid layer" or something like that.

Wayne



More information about the Users mailing list