Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I would like to pass multiple featureTypes to WFS protocol in order to accomplish a search feature in my app. the idea worked just fine with one featureType, but now I need to add another one to expand my search scope. Here is what I did:

var featureTypes = ["Layer_1", "Layer_2"];  

var wfsProtocol = new OpenLayers.Protocol.WFS.v1_1_0({ 
             url: URL,                 
             featureType: featureTypes,
             featureNS: "", 
             srsName: "EPSG:3857", 
             version: "1.1.0", 
             extractAttributes: true, 
             isBaseLayer: false, 
             visibility: true 
    filter: filter,                      
    callback: processTheQuery, 
    scope: [new OpenLayers.Strategy.Fixed({preload: true})],

But still didn't work, Any idea?

share|improve this question
up vote 0 down vote accepted

Found a solution!

just combining the two layers in one by UNION. It works for me.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.