[OpenLayers-Dev] SelectFeature and last/prevHighlighter

Slawomir Messner slawomir.messner at staff.uni-marburg.de
Tue May 10 03:37:24 EDT 2011

I opened a ticket http://trac.osgeo.org/openlayers/ticket/3296 and 
appended my patch proposal.

Am 10.05.2011 08:33, schrieb Eric Lemoine:
> On Tue, May 10, 2011 at 7:20 AM, Slawomir Messner
> <slawomir.messner at staff.uni-marburg.de>  wrote:
>> Hi,
>> the use-case is that we have two SelectFeature controls. One for selecting
>> features to know to which feature add attributes the other one for
>> highlighting features that already have certain attributes. So if you select
>> some features and then highlight some features to see which one has an
>> attribute then you unhighlight them to un-/select or assign some attributes
>> the selection disappears. Selecting happens by clicking or a box,
>> un-/highlight by hover over a row of a table ("legend").
> In your case, if I read you correctly, you programmatically
> highlight/unhighlight features. And I think that's what reveals the
> problem.
> I can reproduce the problem on
> http://openlayers.org/dev/examples/highlight-feature.html
> - click on the feature on the right to select it
> - in the FireBug console highlight the feature with
> map.controls[4].highlight(map.layers[0].features[0])
> - then unhighlight it with
> map.controls[4].unhighlight(map.layers[0].features[0])
> - bug: the feature turns yellow, while it should be blue
> To fix this, I think we should move some logic from outFeature to
> unhighlight, so this logic applies even when unhighlighting features
> programmatically.
> Feel free to create a ticket (and possibly a patch) for that.
> Thanks,

More information about the Dev mailing list