<html><head><base href="x-msg://77/"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Hi,<div><br></div><div>wrt your OL 2.9RC2 remark, dus you have an example page to demonstrate the problem?</div><div><br></div><div>Best regards,</div><div>Bart</div><div><br><div><div>On Apr 14, 2010, at 9:52 AM, Jordi Romagos i Figueras wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><span class="Apple-style-span" style="border-collapse: separate; font-family: Helvetica; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div class="hmmessage" style="font-size: 10pt; font-family: Verdana; "><br>Finally I found an explanation!!!<span class="Apple-converted-space"> </span><br> <br>The problem was because I put selectfeature control code above to map.addLayers code. If I put the code below map.addLayers it works fine! <br>About event handlers I also tried before but I had the same problem, in FF in some layers doesn't works mouse events.<span class="Apple-converted-space"> </span><br> <br>Another thing, I'm not sure If it's a problem because I not read 2.9 API. I tried the same code using OL 2.9 RC2 and positions doesn't match! I don't know If I have to change anything?<br> <br>Another time a lot of thanks!<br> <br> <br>> Subject: Re: [OpenLayers-Users] Multiple Vector Layers (FireFox issue)<br>> From:<span class="Apple-converted-space"> </span><a href="mailto:ahocevar@opengeo.org">ahocevar@opengeo.org</a><br>> Date: Tue, 13 Apr 2010 16:25:10 +0200<br>> CC:<span class="Apple-converted-space"> </span><a href="mailto:users@openlayers.org">users@openlayers.org</a><br>> To:<span class="Apple-converted-space"> </span><a href="mailto:jordi_romagos@hotmail.com">jordi_romagos@hotmail.com</a><br>><span class="Apple-converted-space"> </span><br>><span class="Apple-converted-space"> </span><br>> On Apr 13, 2010, at 15:35 , Jordi Romagos i Figueras wrote:<br>><span class="Apple-converted-space"> </span><br>> > Sorry Andreas,<br>> ><span class="Apple-converted-space"> </span><br>> > I will explain better,<br>> ><span class="Apple-converted-space"> </span><br>> > What I want is when some user select one feature of the two top layers the application displays a popup with information extracted from a php script. This, works fine when I do this:<br>> ><span class="Apple-converted-space"> </span><br>> > selectControl = new OpenLayers.Control.SelectFeature(layer1, {onSelect: onFeatureSelect,onUnselect:onFeatureUnSelect, hover: onFeatureHover});<br>><span class="Apple-converted-space"> </span><br>> Note: there is no hover method. hover is a boolean property. Also, you should consider using event handlers instead of callback functions.<br>><span class="Apple-converted-space"> </span><br>> ><span class="Apple-converted-space"> </span><br>> > But it doesn't call my onFeatureSelect method when I call like an array parameter, in fact, now I prove only one and the same layer and it doesn't works:<br>> ><span class="Apple-converted-space"> </span><br>> > selectControl = new OpenLayers.Control.SelectFeature([layer1], {onSelect: onFeatureSelect,onUnselect:onFeatureUnSelect, hover: onFeatureHover});<br>><span class="Apple-converted-space"> </span><br>> Are you sure you are using OpenLayers >= 2.8? Multi-layer selection was added in 2.8<br>><span class="Apple-converted-space"> </span><br>> Regards,<br>> Andreas.<br>><span class="Apple-converted-space"> </span><br>><span class="Apple-converted-space"> </span><br>> ><span class="Apple-converted-space"> </span><br>> > All of this happend when I'm using Firefox browser.<br>> ><span class="Apple-converted-space"> </span><br>> > Thanks another time,<br>> > Jordi.<br>> ><span class="Apple-converted-space"> </span><br>> > > Subject: Re: [OpenLayers-Users] Multiple Vector Layers (FireFox issue)<br>> > > From:<span class="Apple-converted-space"> </span><a href="mailto:ahocevar@opengeo.org">ahocevar@opengeo.org</a><br>> > > Date: Tue, 13 Apr 2010 14:30:29 +0200<br>> > > CC:<span class="Apple-converted-space"> </span><a href="mailto:users@openlayers.org">users@openlayers.org</a><br>> > > To:<span class="Apple-converted-space"> </span><a href="mailto:jordi_romagos@hotmail.com">jordi_romagos@hotmail.com</a><br>> > ><span class="Apple-converted-space"> </span><br>> > > On Apr 13, 2010, at 12:58 , Jordi Romagos i Figueras wrote:<span class="Apple-converted-space"> </span><br>> > > > I tried what you said Andreas, and doesn't work for me (I'm using OL 2.8)<br>> > ><span class="Apple-converted-space"> </span><br>> > > What exactly "does not work"?<br>> > ><span class="Apple-converted-space"> </span><br>> > > > I changed:<br>> > > ><span class="Apple-converted-space"> </span><br>> > > > selectControl = new OpenLayers.Control.SelectFeature(layer1, {onSelect: onFeatureSelect,onUnselect:onFeatureUnSelect, hover: onFeatureHover});<br>> > > > for:<br>> > > > selectControl = new OpenLayers.Control.SelectFeature([layer1,layer2], {onSelect: onFeatureSelect,onUnselect:onFeatureUnSelect, hover: onFeatureHover});<br>> > > ><span class="Apple-converted-space"> </span><br>> > > > I have to do something else?<br>> > ><span class="Apple-converted-space"> </span><br>> > > No, that should be all.<br>> > ><span class="Apple-converted-space"> </span><br>> > > Regards,<br>> > > Andreas.<br>> > ><span class="Apple-converted-space"> </span><br>> > > ><span class="Apple-converted-space"> </span><br>> > > > Thanks.<br>> > > ><span class="Apple-converted-space"> </span><br>> > > ><span class="Apple-converted-space"> </span><br>> > > > > Date: Mon, 12 Apr 2010 20:52:50 +0200<br>> > > > > From:<span class="Apple-converted-space"> </span><a href="mailto:ahocevar@opengeo.org">ahocevar@opengeo.org</a><br>> > > > > To:<span class="Apple-converted-space"> </span><a href="mailto:users@openlayers.org">users@openlayers.org</a><br>> > > > > Subject: Re: [OpenLayers-Users] Multiple Vector Layers (FireFox issue)<br>> > > > ><span class="Apple-converted-space"> </span><br>> > > > > On 2010-04-12 20:30 , chandanpansare wrote:<br>> > > > > > I have multiple vector layers added in map and for each layer I have<br>> > > > > > SelectFeature control.<br>> > > > > > In IE, Chrome and Safari I'm able to select features of all the layers but<br>> > > > > > in case of FireFox only features from the last layer added are accessible.<br>> > > > > > would like to if there any work around / solution for this or is it a known<br>> > > > > > issue?<br>> > > > > > Any help will be greatly appreciated.<br>> > > > > ><span class="Apple-converted-space"> </span><br>> > > > ><span class="Apple-converted-space"> </span><br>> > > > > You only need one SelectFeature control for all your layers. Configure<span class="Apple-converted-space"> </span><br>> > > > > it with an array of your layers, instead of just one layer.<br>> > > > ><span class="Apple-converted-space"> </span><br>> > > > > Regards,<br>> > > > > Andreas.<br>> > > > ><span class="Apple-converted-space"> </span><br>> > > > > --<span class="Apple-converted-space"> </span><br>> > > > > Andreas Hocevar<br>> > > > > OpenGeo -<span class="Apple-converted-space"> </span><a href="http://opengeo.org/">http://opengeo.org/</a><br>> > > > > Expert service straight from the developers.<br>> > > > ><span class="Apple-converted-space"> </span><br>> > > > > _______________________________________________<br>> > > > > Users mailing list<br>> > > > ><span class="Apple-converted-space"> </span><a href="mailto:Users@openlayers.org">Users@openlayers.org</a><br>> > > > ><span class="Apple-converted-space"> </span><a href="http://openlayers.org/mailman/listinfo/users">http://openlayers.org/mailman/listinfo/users</a><br>> > > ><span class="Apple-converted-space"> </span><br>> > > > Tus datos personales, más seguros con Internet Explorer 8. ¡Descárgatelo gratis!_______________________________________________<br>> > > > Users mailing list<br>> > > ><span class="Apple-converted-space"> </span><a href="mailto:Users@openlayers.org">Users@openlayers.org</a><br>> > > ><span class="Apple-converted-space"> </span><a href="http://openlayers.org/mailman/listinfo/users">http://openlayers.org/mailman/listinfo/users</a><br>> > ><span class="Apple-converted-space"> </span><br>> > > --<span class="Apple-converted-space"> </span><br>> > > Andreas Hocevar<br>> > > OpenGeo -<span class="Apple-converted-space"> </span><a href="http://opengeo.org/">http://opengeo.org/</a><br>> > > Expert service straight from the developers.<br>> > ><span class="Apple-converted-space"> </span><br>> ><span class="Apple-converted-space"> </span><br>> > Tus datos personales, más seguros con Internet Explorer 8. ¡Descárgatelo gratis!_______________________________________________<br>> > Users mailing list<br>> ><span class="Apple-converted-space"> </span><a href="mailto:Users@openlayers.org">Users@openlayers.org</a><br>> ><span class="Apple-converted-space"> </span><a href="http://openlayers.org/mailman/listinfo/users">http://openlayers.org/mailman/listinfo/users</a><br>><span class="Apple-converted-space"> </span><br>> --<span class="Apple-converted-space"> </span><br>> Andreas Hocevar<br>> OpenGeo -<span class="Apple-converted-space"> </span><a href="http://opengeo.org/">http://opengeo.org/</a><br>> Expert service straight from the developers.<br>><span class="Apple-converted-space"> </span><br><br><hr>Tus datos personales, más seguros con Internet Explorer 8.<span class="Apple-converted-space"> </span><a href="http://www.microsoft.com/spain/windows/internet-explorer/default.aspx" target="_new">¡Descárgatelo gratis!</a><span class="Apple-converted-space"> </span>_______________________________________________<br>Users mailing list<br><a href="mailto:Users@openlayers.org">Users@openlayers.org</a><br><a href="http://openlayers.org/mailman/listinfo/users">http://openlayers.org/mailman/listinfo/users</a><br></div></span></blockquote></div><br></div></body></html>