<div style="color: rgb(34, 34, 34); font-family: arial, sans-serif; font-size: 13px; background-color: rgba(255, 255, 255, 0.917969); ">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" style="color: rgb(17, 85, 204); font-family: arial, sans-serif; font-size: 13px; background-color: rgba(255, 255, 255, 0.917969); ">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">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 class="h5"><br>
On Sun, Dec 4, 2011 at 9:05 PM, Diego Pasqualin &lt;<a href="mailto:dpasqualin@gmail.com">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">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">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 class="HOEnZb"><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>