Great, thanks again!<br><br><div class="gmail_quote">2011/12/8 Andreas Hocevar <span dir="ltr"><<a href="mailto:ahocevar@opengeo.org">ahocevar@opengeo.org</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Tim has developed this feature already, it just never made it into a<br>
patch: <a href="http://trac.osgeo.org/openlayers/browser/sandbox/tschaub/select/lib/OpenLayers/FeatureAgent.js" target="_blank">http://trac.osgeo.org/openlayers/browser/sandbox/tschaub/select/lib/OpenLayers/FeatureAgent.js</a>.<br>
Example: <a href="http://dev.openlayers.org/sandbox/tschaub/select/examples/feature-events.html" target="_blank">http://dev.openlayers.org/sandbox/tschaub/select/examples/feature-events.html</a><br>
<span class="HOEnZb"><font color="#888888"><br>
Andreas.<br>
</font></span><div class="HOEnZb"><div class="h5"><br>
On Wed, Dec 7, 2011 at 10:14 PM, Diego Pasqualin <<a href="mailto:dpasqualin@gmail.com">dpasqualin@gmail.com</a>> wrote:<br>
> I see, your are right, that's the problem!! Thank you very much.<br>
><br>
> By the way, wouldn't be nice if all overlapping features get the event?<br>
> Something like the "event bubbling" on javascript?<br>
><br>
> 2011/12/8 Andreas Hocevar <<a href="mailto:ahocevar@opengeo.org">ahocevar@opengeo.org</a>><br>
>><br>
>> Layers on top of each other yes. Features no.<br>
>><br>
>> Andreas.<br>
>><br>
>> On Dec 7, 2011 8:50 PM, "Diego Pasqualin" <<a href="mailto:dpasqualin@gmail.com">dpasqualin@gmail.com</a>> wrote:<br>
>>><br>
>>> According to this example is possible to get events from different<br>
>>> layers, but I just can't make it work =(<br>
>>> <a href="http://openlayers.org/dev/examples/select-feature-multilayer.html" target="_blank">http://openlayers.org/dev/examples/select-feature-multilayer.html</a><br>
>>><br>
>>> 2011/12/8 Andreas Hocevar <<a href="mailto:ahocevar@opengeo.org">ahocevar@opengeo.org</a>><br>
>>>><br>
>>>> Hi,<br>
>>>><br>
>>>> for features that sit on top of each other, you will only get events<br>
>>>> for the top one. Sounds like this is the reason for your problem.<br>
>>>><br>
>>>> Andreas.<br>
>>>><br>
>>>> On Sun, Dec 4, 2011 at 9:05 PM, Diego Pasqualin <<a href="mailto:dpasqualin@gmail.com">dpasqualin@gmail.com</a>><br>
>>>> wrote:<br>
>>>> > Oh, I forgot to put this part of the code, which is run just after the<br>
>>>> > previous code:<br>
>>>> ><br>
>>>> > ---------------------------8<----------------------------------------------------------------------<br>
>>>> > entities.layer_office.events.on({<br>
>>>> > 'featureselected': function (e)<br>
>>>> > {onFeatureSelect(e.feature,<br>
>>>> > entity.map, control)},<br>
>>>> > 'featureunselected': function (evt)<br>
>>>> > {onFeatureUnselect(evt.feature, entity.map) }<br>
>>>> > });<br>
>>>> > ... the same for suburbs.suburbs_layer...<br>
>>>> ><br>
>>>> > ---------------------------8<----------------------------------------------------------------------<br>
>>>> ><br>
>>>> > So, I create the control with the layers I want, and after that I use<br>
>>>> > the<br>
>>>> > layers.events.on to run something when the a feature is selected.<br>
>>>> > This is practically the same I saw in some examples. What could be<br>
>>>> > wrong?<br>
>>>> ><br>
>>>> > 2011/12/3 emmexx <<a href="mailto:emmexx@tiscalinet.it">emmexx@tiscalinet.it</a>><br>
>>>> >><br>
>>>> >> Il 12/02/2011 01:45 AM, Diego Pasqualin scrisse:<br>
>>>> >><br>
>>>> >> > Any suggestion about what I might be doing wrong?<br>
>>>> >><br>
>>>> >> Try using eventListeners instead of OnSelect?<br>
>>>> >> Or layer.events.on().<br>
>>>> >><br>
>>>> >> Bye<br>
>>>> >> maxx<br>
>>>> ><br>
>>>> ><br>
>>>> ><br>
>>>> > _______________________________________________<br>
>>>> > Users mailing list<br>
>>>> > <a href="mailto:Users@lists.osgeo.org">Users@lists.osgeo.org</a><br>
>>>> > <a href="http://lists.osgeo.org/mailman/listinfo/openlayers-users" target="_blank">http://lists.osgeo.org/mailman/listinfo/openlayers-users</a><br>
>>>> ><br>
>>>><br>
>>>><br>
>>>><br>
>>>> --<br>
>>>> Andreas Hocevar<br>
>>>> OpenGeo - <a href="http://opengeo.org/" target="_blank">http://opengeo.org/</a><br>
>>>> Expert service straight from the developers.<br>
>>><br>
>>><br>
><br>
<br>
<br>
<br>
--<br>
Andreas Hocevar<br>
OpenGeo - <a href="http://opengeo.org/" target="_blank">http://opengeo.org/</a><br>
Expert service straight from the developers.<br>
</div></div></blockquote></div><br>