[OpenLayers-Users] select feature with multiple wfs
Andreas Hocevar
andreas.hocevar at gmail.com
Wed Feb 27 11:36:46 EST 2008
Lars,
this is a known issue. See http://trac.openlayers.org/ticket/434 for
details.
Regards,
Andres.
Lars Lingner wrote:
> Hello,
>
> currently I'm doing my first steps with OL. I want to setup a map with
> multiple different overlay layers (WFS). The features of these layers
> should expose their attributes on an certain event (like onClick, hover
> etc). Currently I'm just filling an div element with an callback function.
>
> Its working fine if I use just one OpenLayers.Control.SelectFeature
>
>
>
> var sf_lines_wfs = new OpenLayers.Control.SelectFeature(lines_wfs,
> {
> onSelect: lineSelected,
> onUnselect: lineUnselected
> }
> );
> map.addControl(sf_lines_wfs);
> sf_lines_wfs.activate();
>
> If I add other OpenLayers.Control.SelectFeature to my other layers my
> featureinfo function seems to work randomly.
>
> var sf_alt_lines_wfs = new OpenLayers.Control.SelectFeature(alt_lines_wfs,
> {
> onSelect: altLineSelected,
> onUnselect: altLineUnselected
> }
> );
> map.addControl(sf_alt_lines_wfs);
> sf_alt_lines_wfs.activate();
>
> Is this the right way to go?
>
> How can I read and process attributes from different wfs-layers? Each
> WFS-Layer should be accessible through the OL.Layerswitcher
>
> I search the examples of OL but I couldn't find one pushing me the right
> way.
>
> Thanks in advance....
>
> lars
>
> _______________________________________________
> Users mailing list
> Users at openlayers.org
> http://openlayers.org/mailman/listinfo/users
>
More information about the Users
mailing list