Hi Eric, after filing the ticket http://trac.openlayers.org/ticket/2812
I got a message from Ilias, because he had to deal with the same problem. His solution to add to the selectCtrl an onUnselect and in this function to call highlightCtrl.unhighlight(feature); works fine for me. The two controls interfere and by calling a function of one in the other solves the problem. Anyway I think that a solution of only one control for highlight and select might be valuable, or? Otherwise an example for this problem should be under examples and I would be happy to provide it. Kind regards, Christian Eric Lemoine wrote: > On Thu, Aug 26, 2010 at 9:13 AM, Christian Niemitz-Rossant > <c...@m-click.de> wrote: > >> I have some troubles using feature selection with highlight and toggle: >> >> In the OpenLayers example highlight-feature.html I replaced the line 55 >> which is >> >> {clickout: true} >> >> by >> >> {toggle: true} >> >> Then I applied these steps >> >> 1. move cursor on the left triangle => triangle is highlighted >> 2. click on the left triangle => triangle is selected >> 3. move cursor out of the triangle => triangle is still selected >> 4. move cursor on the left triangle => triangle is highlighted >> 5. click on the triangle => triangle is normal >> > > I don't observe that. It gets selected in my case, which is expected I guess. > > >> 6. move cursor out of the triangle => triangle is still normal >> > > It remains selected for me. > > >> 7. move cursor on the triangle (no click!) => triangle is highlighted >> 8. move cursor out of the triangle => triangle is shown as selected (without >> click!?) >> >> So somehow the select and the highlight get confused about the correct >> style. The feature is not selected, but it is displayed as selected. >> > > Indeed. If I click the feature again to toggle it I also observe > incorrect behavior when moving out and in. > > > >> It looks like a bug to me, but maybe there is another proposed way to use >> highlight AND toggle at the same time (and hopefully including multiple). >> > > So yes there's a bug. Can you please create a ticket for it please? > > Thanks for reporting the problem. > > >
_______________________________________________ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users