0

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: "http://mapmap.org", 
 srsName: "EPSG:3857", 
 version: "1.1.0", 
 extractAttributes: true, 
 isBaseLayer: false, 
 visibility: true 
 });
wfsProtocol.read({ 
 filter: filter, 
 callback: processTheQuery, 
 scope: [new OpenLayers.Strategy.Fixed({preload: true})],
 })

But still didn't work, Any idea?

asked May 14, 2013 at 10:41

1 Answer 1

0

Found a solution!

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

answered May 15, 2013 at 18:35

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.