<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'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"><<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;">
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 <<a href="mailto:dpasqualin@gmail.com">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">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">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 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>