title: openlayer select wms layer
body: <p>in my application I have a googlemap and some WMS layers coming from geoserver, I need to select the features on these layers, I followed this example: <a href="http://openlayers.org/dev/examples/getfeature-wfs.html" rel="nofollow">http://openlayers.org/dev/examples/getfeature-wfs.html</a>, I get no errors, when I click on a feature, the mouse start to spin, but with no result at all, this is my code:</p>
  
  <pre><code>var ghyb = new OpenLayers.Layer.Google(
          "Google Hybrid",
          {"type": google.maps.MapTypeId.HYBRID, numZoomLevels: 20}
      );
              var options = {
              controls: [],
              //sphericalMercator:true,
              //projection: new OpenLayers.Projection('EPSG:900913'), // senza la proiezione mi stampa metà layer
              units: "m",
              numZoomLevels: 22,            
              maxResolution: 156543.0339,
              maxExtent: new OpenLayers.Bounds(-20037508.34, -20037508.34,
                           20037508.34, 20037508.34)
              };
              var panZoom = new OpenLayers.Control.PanZoom();
          var map = new OpenLayers.Map('map', {
                  div: "gmap",
                  projection: "EPSG:900913",
                  displayProjection: "EPSG:4326",
                  //zoomOffset: 5
          controls: [
              panZoom,
              new OpenLayers.Control.Navigation()
          ]
          });
  var regioni      = new OpenLayers.Layer.WMS(
              "regioni",
              "http://localhost:8080/geoserver/wms",
              {
              layers: "metmi-italy:reg2011_g" ,
              transparent: "true",
              format: "image/png",
              srs:'EPSG:900913', // old: 'EPSG:2077'
              //zoomOffset: 4,
              },
              {isBaseLayer: false,}
          );
  control = new OpenLayers.Control.GetFeature({
          protocol: OpenLayers.Protocol.WFS.fromWMSLayer(regioni),
          box: true,
          hover: true,
          multipleKey: "shiftKey",
          toggleKey: "ctrlKey"
          });
  select = new OpenLayers.Layer.Vector("Selezioni", {styleMap: 
          new OpenLayers.Style(OpenLayers.Feature.Vector.style["select"])
          });
  map.addLayers([ghyb,regioni,select])
  control.events.register("featureunselected", this, function(e) {
              removeFeaturesFromGrid(e.feature.fid);
          select.removeFeatures([e.feature]);
  
          });
  control.events.register("featureselected", this, function(e) {
                  console.log('selected')
                  select.addFeatures([e.feature]);
                  //addFeaturesToGrid(e.feature);         
          });
  map.addControl(control);
  control.activate()
  </code></pre>
  
  <p>I think there is something that is missing, but I do not find it</p>