title: Select features of layer which is not on top
body: <p>I have a map with 3 layers: 1 base layer, 1 overlay and 1 WFS layer.
  I load them like this:</p>
  
  <pre><code>map.addLayers([baseLayer, wfsLayer, overlayLayer]);
  </code></pre>
  
  <p>When an user clicks on the map it should select the feature on the WFS layer.
  So I have added the select control after calling map.addLayers:</p>
  
  <pre><code>  selectControl = new OpenLayers.Control.SelectFeature(
        [wfsLayer],
        {
            clickout: true, toggle: false,
            multiple: false, hover: false
        }
    );
    map.addControl(selectControl);
    selectControl.activate();
  </code></pre>
  
  <p>This works great, my features get selected when clicked.</p>
  
  <p>But my overlay layer is beneath the WFS layer and I want it to be on top.
  The overlay layer is a non-filled polygon layer.
  So I added </p>
  
  <pre><code>map.setLayerZIndex(overlayLayer, map.Z_INDEX_BASE[ "Feature" ]+10);
  </code></pre>
  
  <p>after map.addLayers.
  This looks OK. My overlay layer is now above my WFS layer.
  But when I now click on the map, nothing gets selected.</p>
  
  <p>Most likely I'm not doing it right. How can I make my overlay layer on top and my WFS layer selectable?</p>
  
  <p>[EDIT]</p>
  
  <p>As mentioned by Christophe I tried </p>
  
  <pre><code>  selectControl = new OpenLayers.Control.SelectFeature( 
        [wfsLayer, overlayLayer], 
        { 
          clickout: true, toggle: false, 
          multiple: false, hover: false
        }
    );
  </code></pre>
  
  <p>But that resulted in an OL Error, probably because the overlay layer is a WMS layer.</p>
  
  <p>[EDIT #2]</p>
  
  <p>I've reposted this question at <a href="https://gis.stackexchange.com/questions/59619/select-features-of-layer-which-is-not-on-top-in-openlayers">https://gis.stackexchange.com/questions/59619/select-features-of-layer-which-is-not-on-top-in-openlayers</a></p>