[OpenLayers-Users] selectcontrol and layers property

Frank Broniewski brfr at metrico.lu
Fri May 8 02:55:14 EDT 2009


I didn't find the time to reply yesterday, but I want to confirm that the rc2 
indeed solves this. And it works fine so far with my 5 KML Layers. Good work!

And by comparing the two docs (for v2.7 and v2.8) I can see that a lot of work 
has been done at the Control.SelectFeature level.

Frank

On Thursday 07 May 2009 18:18:25 Eric Lemoine wrote:
> On Thursday, May 7, 2009, Kris Geusebroek <kgeusebroek at xebia.com> wrote:
> > Hi Frank,
> >
> > The multiple layers selectcontrol is supported in OpenLayers 2.8 (rc2
> > now). The docs you looked at are 2.8 and you are using 2.7 OpenLayers
> > build.
> >
> > If you try with latest rc of 2.8 you will succeed.
>
> Yes, ahocevar (possibly with help from others) put an end to this
> "select control does not work on multiple layers" story :-)
>
> > Cheers Kris
> >
> > -----Original Message-----
> > From: users-bounces at openlayers.org [mailto:users-bounces at openlayers.org]
> > On Behalf Of Frank Broniewski Sent: Thursday, May 07, 2009 10:58 AM
> > To: users at openlayers.org
> > Subject: [OpenLayers-Users] selectcontrol and layers property
> >
> > I am currently trying to enable the querying of serveral GML (in fact
> > KML) layers in my map. Just one result per click, but without choosing
> > the query layer first.
> >
> > My preferred route was to use a selectcontrol and pass an array of layers
> > in ( see
> > http://dev.openlayers.org/docs/files/OpenLayers/Control/SelectFeature-
> > js.html#OpenLayers.Control.SelectFeature.layers ). But that does not
> > work. Firebug tells me that the script stops with an error:
> > "this.layer.getZIndex is not a function". It is the
> > selectControl.activate(); function that causes this. OL version 2.7
> > linked from the homepage ...
> >
> > So I came and searched the mailing lists for a solution just to find out,
> > that querying multiple layers with the selectcontrol is currently not
> > supported ( see
> > http://n2.nabble.com/Several-selectFeature-control-tp1831251p1831256.html
> > from Eric Lemoine for example )
> >
> > Whats the purpose of this layers property then? And frankly I don't
> > exactly understand the layer property description also (stupid me ;-)),
> > especially "The vector layer with a common renderer root for all layers
> > this control is configured with (if an array of layers was passed to the
> > constructor)" I only can see that there is some kind of reference to the
> > layers property -> "array of layers", but I fail to understand the
> > meaning of this all ...
> >
> > If someone could shed some light onto the matter I would be grateful
> >
> > Frank
> > --
> > Frank Broniewski
> >
> > Metrico s.àr.l. ( http://www.metrico.lu )
> > 36, rue des Romains
> > L-5433 Niederdonven
> > Luxembourg
> >
> > Fon: +352 26 74 94 28
> > Fax: +352 26 74 94 99
> > _______________________________________________
> > Users mailing list
> > Users at openlayers.org
> > http://openlayers.org/mailman/listinfo/users
> > _______________________________________________
> > Users mailing list
> > Users at openlayers.org
> > http://openlayers.org/mailman/listinfo/users


-- 
Frank Broniewski

Metrico s.àr.l. ( http://www.metrico.lu )
36, rue des Romains 
L-5433 Niederdonven 
Luxembourg

Fon: +352 26 74 94 28 
Fax: +352 26 74 94 99



More information about the Users mailing list