[OpenLayers-Trac] Re: [OpenLayers] #3046: Calling unselect() on feature removed from layer causes errors (was: Popup can't be closed)

OpenLayers trac-20090302 at openlayers.org
Wed Mar 16 05:45:46 EDT 2011


#3046: Calling unselect() on feature removed from layer causes errors
---------------------------------+------------------------------------------
 Reporter:  pebXX2346            |       Owner:              
     Type:  bug                  |      Status:  new         
 Priority:  minor                |   Milestone:  2.11 Release
Component:  examples             |     Version:  SVN         
 Keywords:  Popup Strategy BBOX  |       State:  Review      
---------------------------------+------------------------------------------

Comment(by crschmidt):

 Closed #2515 as a dupe, but it has more details: specifically, the problem
 is in unselect() calling unhighlight() which expects the feature to have a
 layer, but unselect also has other events; I *think* what this might mean
 is that we have to bail early in the unselect code if the feature doesn't
 have a layer... but at that point I *think* that selectedFeatures might be
 bunk, because it will have a feature in it that no longer exists... I'm
 not sure exactly how deep into this rabbithole we want to go.

 Note that this behavior is *not* a popup-specific problem: any
 selectfeature code that calls unselect on a feature which has been removed
 from the layer will fail.

-- 
Ticket URL: <http://trac.openlayers.org/ticket/3046#comment:10>
OpenLayers <http://openlayers.org/>
A free AJAX map viewer


More information about the Trac mailing list