I see, your are right, that's the problem!! Thank you very much.<div><br></div><div>By the way, wouldn't be nice if all overlapping features get the event? Something like the "event bubbling" on javascript?</div>
<div><div><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;">
<p>Layers on top of each other yes. Features no. </p><span class="HOEnZb"><font color="#888888">
<p>Andreas.</p></font></span><div class="HOEnZb"><div class="h5">
<div class="gmail_quote">On Dec 7, 2011 8:50 PM, "Diego Pasqualin" <<a href="mailto:dpasqualin@gmail.com" target="_blank">dpasqualin@gmail.com</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div>According to this example is possible to get events from different layers, but I just can't make it work =(</div><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><div class="gmail_quote">2011/12/8 Andreas Hocevar <span dir="ltr"><<a href="mailto:ahocevar@opengeo.org" target="_blank">ahocevar@opengeo.org</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
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>
<div><div><br>
On Sun, Dec 4, 2011 at 9:05 PM, Diego Pasqualin <<a href="mailto:dpasqualin@gmail.com" target="_blank">dpasqualin@gmail.com</a>> wrote:<br>
> Oh, I forgot to put this part of the code, which is run just after the<br>
> previous code:<br>
> ---------------------------8<----------------------------------------------------------------------<br>
> entities.layer_office.events.on({<br>
> 'featureselected': function (e) {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>
> ---------------------------8<----------------------------------------------------------------------<br>
><br>
> So, I create the control with the layers I want, and after that I use 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 wrong?<br>
><br>
> 2011/12/3 emmexx <<a href="mailto:emmexx@tiscalinet.it" target="_blank">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>
</div></div>> _______________________________________________<br>
> Users mailing list<br>
> <a href="mailto:Users@lists.osgeo.org" target="_blank">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>
<span><font color="#888888"><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>
</font></span></blockquote></div><br>
</blockquote></div>
</div></div></blockquote></div><br></div></div>