title: How to search for an attribute in openalyers with wfs layer?
body: <p>I'm trying to use the example <a href="http://viglino.github.io/ol-ext/examples/search/map.control.searchfeature.html" rel="nofollow noreferrer">http://viglino.github.io/ol-ext/examples/search/map.control.searchfeature.html</a>. I have a wfs layer that contains information in polygons about neighborhood, with the NAME attribute. I want this search, in which the user types the name of the neighborhood, and locates it on the map, through the layer. But it's not working. Can someone help me?</p>
  <p>Another thing... it is possible to have more than one var select = new ol.interaction.Select({}); in the map? Thanks</p>
  <p>var select = new ol.interaction.Select({});</p>
  <pre><code>    map.addInteraction(select);
      var search = new ol.control.SearchFeature(
      {   
          source: layer_limite_bairros_oficial,
          property: &quot;NOME&quot;,
          placeholder: 'Nome do Bairro...',
          autocomplete: function (s) {    
              var result = [];
              s = s.replace(/^\*/,'');
              var rex = new RegExp(s, 'i');
              var features = this.source_.getFeatures();
              for (var i=0, f; f=features[i]; i++) {
                  if (rex.test(f.get('NOME'))) {  
                      result.push(f);
                      if ((--max)&lt;=0) break;
                  }
              }
              return result;
          }
      });
  
      search.on('select', function(e)
      {   
          alert(e.search);
          select.getFeatures().clear();
          select.getFeatures().push (e.search);
          var p = e.search.getGeometry().getFirstCoordinate();
          alert(p);
          map.getView().setZoom(18);
          map.getView().animate({ center:p });
      });
      map.addControl (search);
  </code></pre>