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

1 Answer 1


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.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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