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 have a WFS layer which a protocol in the definition. The protocol states that the maxFeatures returned should be 1 to avoid downloading a large amount of data.

I can update the value for maxFeatures using layer.protocol.maxFeatures and this registers as updating successfully but when I then call a layer.refress({force:true}); command the actual WFS request still appears to be limited to 1.

Is there a good example of how to modify a WFS protocol using javascript once the layer has already been loaded into the map?

Many thanks

share|improve this question

I have now resolved this issue.

It appears that the maxFeatures setting is under layer.protocol.options.maxFeatures.

I now have two references but updating both has the desired impact.

share|improve this answer
+1 for posting the solution once you found it. – Kevin R Dyke Apr 21 '14 at 21:24

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.