Closing a popup does not work if the underlying feature is removed while popup was open. This can easily happen when using e.g. a BBOX Strategy:
1. user clicks on a feature to open a popup
2. if popup is visually large, panMapIfOutOfView kicks in and pans the map to keep popup in view
3. OL BBOX Strategy kicks in, fetches new features and removes old ones from layer (this sets Drupal.openlayers.popup.selectedFeature.layer=null)
4. user clicks on popup closebox [X]
5. DOL Popup behavior close function fails because Drupal.openlayers.popup.selectedFeature.layer==null

Attached is a patch of openlayers_behavior_popup.js against 6.x-2.x CVS.

CommentFileSizeAuthor
OpenLayers-popup-featureremoved.patch1.44 KBahtih
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

tmcw’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.