I see, your are right, that&#39;s the problem!! Thank you very much.<div><br></div><div>By the way, wouldn&#39;t be nice if all overlapping features get the event? Something like the &quot;event bubbling&quot; on javascript?</div>
<div><div><br><div class="gmail_quote">2011/12/8 Andreas Hocevar <span dir="ltr">&lt;<a href="mailto:ahocevar@opengeo.org">ahocevar@opengeo.org</a>&gt;</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, &quot;Diego Pasqualin&quot; &lt;<a href="mailto:dpasqualin@gmail.com" target="_blank">dpasqualin@gmail.com</a>&gt; 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&#39;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">&lt;<a href="mailto:ahocevar@opengeo.org" target="_blank">ahocevar@opengeo.org</a>&gt;</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 &lt;<a href="mailto:dpasqualin@gmail.com" target="_blank">dpasqualin@gmail.com</a>&gt; wrote:<br>
&gt; Oh, I forgot to put this part of the code, which is run just after the<br>
&gt; previous code:<br>
&gt; ---------------------------8&lt;----------------------------------------------------------------------<br>
&gt;         entities.layer_office.events.on({<br>
&gt;             &#39;featureselected&#39;: function (e) {onFeatureSelect(e.feature,<br>
&gt; entity.map, control)},<br>
&gt;             &#39;featureunselected&#39;: function (evt)<br>
&gt; {onFeatureUnselect(evt.feature, entity.map) }<br>
&gt;         });<br>
&gt; ... the same for suburbs.suburbs_layer...<br>
&gt; ---------------------------8&lt;----------------------------------------------------------------------<br>
&gt;<br>
&gt; So, I create the control with the layers I want, and after that I use the<br>
&gt; layers.events.on to run something when the a feature is selected.<br>
&gt; This is practically the same I saw in some examples. What could be wrong?<br>
&gt;<br>
&gt; 2011/12/3 emmexx &lt;<a href="mailto:emmexx@tiscalinet.it" target="_blank">emmexx@tiscalinet.it</a>&gt;<br>
&gt;&gt;<br>
&gt;&gt; Il 12/02/2011 01:45 AM, Diego Pasqualin scrisse:<br>
&gt;&gt;<br>
&gt;&gt; &gt; Any suggestion about what I might be doing wrong?<br>
&gt;&gt;<br>
&gt;&gt; Try using eventListeners instead of OnSelect?<br>
&gt;&gt; Or layer.events.on().<br>
&gt;&gt;<br>
&gt;&gt; Bye<br>
&gt;&gt;        maxx<br>
&gt;<br>
&gt;<br>
&gt;<br>
</div></div>&gt; _______________________________________________<br>
&gt; Users mailing list<br>
&gt; <a href="mailto:Users@lists.osgeo.org" target="_blank">Users@lists.osgeo.org</a><br>
&gt; <a href="http://lists.osgeo.org/mailman/listinfo/openlayers-users" target="_blank">http://lists.osgeo.org/mailman/listinfo/openlayers-users</a><br>
&gt;<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>