[OpenLayers-Dev] SelectFeature control

Eric Lemoine eric.c2c at gmail.com
Fri Mar 13 11:28:55 EDT 2009


On Fri, Mar 6, 2009 at 2:50 PM, Alexandre Dube <adube at mapgears.com> wrote:
> Hi Eric,
>
>  This looks flawless but the easiest way to know would be to test it.  I
> would be glad to test this.
>
>  One thing to though is that a SelectFeature control can draw features
> depending on its renderIntent value OR selectStyle value.  So, instead of
> storing the previous renderIntent, it could be the previous drawer ( i.e.
> control ) and call feature._previousdrawer.drawFeature(feature) and the
> previous control itself would draw the feature depending if it has a
> selectStyle or renderIntent.
>
>  Your solution looks simple and great.  It has this concept :
>
>  this == current drawer
>  feature._previousdrawer ( or previousrenderintent ) == the previous drawer
>
>  With our 2 controls example that is enough.  Plus, as long as we keep the
> selectedFeature array in the layer objet, there's no need to know more than
> "current" and "previous".  If we have let's say ( silly ) 6 select features
> at the same time, having all their own colors, a feature is
> selected/highlighted and unselected/unhighlighted one at a time so "curent"
> and "previous" drawer is enough.  With that in mind, no need for a "stack"
> of renderIntent or a "stack" of _previousDrawer.
>
>  What do you think ?

I like it. See the attached eric-to-alexandre patch ;-)

--
Eric
-------------- next part --------------
A non-text attachment was scrubbed...
Name: eric-to-alexandre.patch
Type: text/x-diff
Size: 17903 bytes
Desc: not available
Url : http://lists.osgeo.org/pipermail/openlayers-dev/attachments/20090313/4fc9cf4b/eric-to-alexandre.bin


More information about the Dev mailing list