On Mon, Jan 19, 2009 at 10:19 PM, Eric Lemoine <[email protected]> wrote: > On Mon, Jan 19, 2009 at 3:30 PM, Alexandre Dube <[email protected]> wrote: >> Hi Eric, >> >> I took a look at the SelectFeature control. Now I understand what you >> meant and it makes sense. Also, it's also making sense to have this control >> have the possibility to highlight on hover or on click. >> >> "beforefeaturehighlighted" and "featurehighlighted" events make sense, but >> a "featureunhighlighted" (or some other term meaning that the feature was >> highlighted and is now no more) would also be useful. > > Alexandre, > > The more I think about this highlight feature control the more I think > there's no room for both a select feature and a highlight feature > controls. > Same opinion here. We already have a bunch of controls, and now adding two very similar ones...
Currently im using slightly modified SelectFeature control, i added one more option to it: selectOnHover, thats how i quickly solved the problem of only highlighting feature without selecting it. If selectOnHover is true, feature is selected&higlighted (select method is called) on hover, if its false feature is only higlighted, not selected. > What causes people trouble is that they can't use two select feature > controls, one in hover mode and the other in click mode. This is > because once a feature is hovered it is selected, and cannot be > selected again when it is clicked. > > Maybe we could modify the select feature control so that (1) it > optionally uses its own selectedFeatures array, as opposed to relying > on the layer's, and (b) defines its own "beforefeatureselected", > "featureselected" and "featureunselected" event types. In this way, > one should be able to use two select feature controls, and get > "featureselected" events, from the first control when features are > hovered and from the second control when features are clicked. > > Tell me what you think, > > -- > Eric > _______________________________________________ > Users mailing list > [email protected] > http://openlayers.org/mailman/listinfo/users > -- Ivan Grcic _______________________________________________ Users mailing list [email protected] http://openlayers.org/mailman/listinfo/users
