[OpenLayers-Dev] SelectFeature control

Eric Lemoine eric.c2c at gmail.com
Wed Mar 4 09:38:27 EST 2009


On Tue, Mar 3, 2009 at 7:05 PM, Eric Lemoine <eric.c2c at gmail.com> wrote:
> Alexandre
>
> I fully support the idea of being able to have two "highlight feature"
> controls working at the same time, one on hover and one on click.
> However i don't like the renderIntent array in the feature class, it
> brings extra complexity that I think is undesirable. I have to say
> though that i cannot think of a better solution at this point. Still
> thinking...
>
> Thanks for bringing this back up.


Alexandre,

What about this: add an highlightOnly boolean option to the select
feature control, if highlightOnly is true then do not select features,
just highlight them. Also, if highlightOnly is set to true, when
clicking or moving out of an highlighted feature do not unhighlight
the feature if it is in the selected features array, i.e. if it was
previously selected (by another select feature control).

See the attached patch. Note that patch isn't complete - the select
feature control should trigger "featurehighlighted" and
"featureunhighlighted" events to complete the picture.

What do you think?

--
Eric
-------------- next part --------------
A non-text attachment was scrubbed...
Name: highlight-feature.patch
Type: text/x-diff
Size: 10837 bytes
Desc: not available
Url : http://lists.osgeo.org/pipermail/openlayers-dev/attachments/20090304/88dc3d9e/highlight-feature.bin


More information about the Dev mailing list