[OpenLayers-Users] Multiple Vector Layers (FireFox issue)
Jordi Romagos i Figueras
jordi_romagos at hotmail.com
Tue Apr 13 09:35:37 EDT 2010
Sorry Andreas,
I will explain better,
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:
selectControl = new OpenLayers.Control.SelectFeature(layer1, {onSelect: onFeatureSelect,onUnselect:onFeatureUnSelect, hover: onFeatureHover});
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:
selectControl = new OpenLayers.Control.SelectFeature([layer1], {onSelect: onFeatureSelect,onUnselect:onFeatureUnSelect, hover: onFeatureHover});
All of this happend when I'm using Firefox browser.
Thanks another time,
Jordi.
> Subject: Re: [OpenLayers-Users] Multiple Vector Layers (FireFox issue)
> From: ahocevar at opengeo.org
> Date: Tue, 13 Apr 2010 14:30:29 +0200
> CC: users at openlayers.org
> To: jordi_romagos at hotmail.com
>
> On Apr 13, 2010, at 12:58 , Jordi Romagos i Figueras wrote:
> > I tried what you said Andreas, and doesn't work for me (I'm using OL 2.8)
>
> What exactly "does not work"?
>
> > I changed:
> >
> > selectControl = new OpenLayers.Control.SelectFeature(layer1, {onSelect: onFeatureSelect,onUnselect:onFeatureUnSelect, hover: onFeatureHover});
> > for:
> > selectControl = new OpenLayers.Control.SelectFeature([layer1,layer2], {onSelect: onFeatureSelect,onUnselect:onFeatureUnSelect, hover: onFeatureHover});
> >
> > I have to do something else?
>
> No, that should be all.
>
> Regards,
> Andreas.
>
> >
> > Thanks.
> >
> >
> > > Date: Mon, 12 Apr 2010 20:52:50 +0200
> > > From: ahocevar at opengeo.org
> > > To: users at openlayers.org
> > > Subject: Re: [OpenLayers-Users] Multiple Vector Layers (FireFox issue)
> > >
> > > On 2010-04-12 20:30 , chandanpansare wrote:
> > > > I have multiple vector layers added in map and for each layer I have
> > > > SelectFeature control.
> > > > In IE, Chrome and Safari I'm able to select features of all the layers but
> > > > in case of FireFox only features from the last layer added are accessible.
> > > > would like to if there any work around / solution for this or is it a known
> > > > issue?
> > > > Any help will be greatly appreciated.
> > > >
> > >
> > > You only need one SelectFeature control for all your layers. Configure
> > > it with an array of your layers, instead of just one layer.
> > >
> > > Regards,
> > > Andreas.
> > >
> > > --
> > > Andreas Hocevar
> > > OpenGeo - http://opengeo.org/
> > > Expert service straight from the developers.
> > >
> > > _______________________________________________
> > > Users mailing list
> > > Users at openlayers.org
> > > http://openlayers.org/mailman/listinfo/users
> >
> > Tus datos personales, más seguros con Internet Explorer 8. ¡Descárgatelo gratis!_______________________________________________
> > Users mailing list
> > Users at openlayers.org
> > http://openlayers.org/mailman/listinfo/users
>
> --
> Andreas Hocevar
> OpenGeo - http://opengeo.org/
> Expert service straight from the developers.
>
_________________________________________________________________
¡Citas! ¡Ligues! ¿Salimos? ¿Cómo es tu pareja ideal? Búscala en el sitio nº1… ¡Regístrate ya!
http://contactos.es.msn.com/?mtcmk=015352
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20100413/896beef5/attachment.html
More information about the Users
mailing list