[OpenLayers-Users] selectcontrol and layers property

Eric Lemoine eric.lemoine at camptocamp.com
Thu May 7 12:18:25 EDT 2009


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
>

-- 
Eric Lemoine

Camptocamp France SAS
Savoie Technolac, BP 352
73377 Le Bourget du Lac, Cedex

Tel : 00 33 4 79 44 44 96
Mail : eric.lemoine at camptocamp.com
http://www.camptocamp.com



More information about the Users mailing list