Hello all,<br>I have a group Layer:<br> group_layer = new OpenLayers.Layer.WMS(<br> "Group Layer",<br> geoserverUrl,<br> {<br> layers: ['gsns:layer1', 'gsns:layer2'],<br>
styles: ['', '']<br> },<br> {<br> isBaseLayer: false,<br> }<br> );<br> <br>Now I want to register featuresselected event and trigger it on both 'gsns:layer1' and 'gsns:layer2' at once:<br>
<br> groupControl = new OpenLayers.Control.GetFeature({<br> protocol: OpenLayers.Protocol.WFS.fromWMSLayer(group_layer),<br> box: false,<br> toggleKey: "ctrlKey",<br> multiple: true,<br>
single: false<br> });<br> <br> groupControl.events.register('featuresselected', this, function(e) {<br> if features from both gsns:layer1 and gsns:layer2 are selected consider only feature <br>
from gsns:layer2 otherwise consider feature from selected layer.<br> });<br> <br>But unfortunately in this way GetFeature is performed only for the first layer 'gsns:layer1' and 'gsns:layer2' is ignored.<br>
Any hints?<br>