[OpenLayers-Users] selectcontrol and layers property

Frank Broniewski brfr at metrico.lu
Thu May 7 04:57:47 EDT 2009


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



More information about the Users mailing list