Select to view content in your preferred language

Possibility to disable paging for WFS Layer

224
5
03-12-2025 06:05 AM
mikkokärkkäinen
Emerging Contributor

Automatic paging has been added to e.g. the WFS layer to improve performance. In my case it is in fact the opposite: I now get two requests to the WFS server instead of just one. First there is the "RESULTTYPE: hits" request and after that the GetFeature request. 

In my case I only load data from WFS services when I zoom close to the map. I am getting a limited set of data each time and I do not need paging. However, it seems impossible to turn paging off at the moment. A simple "maxPageCount: 0" could do the trick, but anything like that does not seem to be supported.

0 Kudos
5 Replies
Noah-Sager
Esri Regular Contributor
0 Kudos
mikkokärkkäinen
Emerging Contributor

Yes, I have looked into those. But as far as I can see, by modifying those properties I can get all the features in a single request, that is, in a single page. However, this will always result in two requests to the WFS service where there used to be only one request. 

I load data from WFS as the user moves around on the map, so there are potentially lots of requests firing. Setting the maxPageCount to 0 seems to have the same effect as setting it to 1. In many APIs setting parameters like these to 0 or -1 etc. results in disabling the feature. That is what I would like to be able to do as well. Without the ability to disable paging, I always get the "RESULTTYPE: hits" request first and only after that the actual request for the data. Looking at the network log in my browser I can see that a lot of times the "RESULTTYPE: hits" request is as slow or even slower than the actual request for the data.

 

 

0 Kudos
AnneFitz
Esri Regular Contributor

Hi @mikkokärkkäinen - thanks for bringing this to our attention! We'll investigate disabling paging when the maxPageCount is 0 or 1.

AnneFitz
Esri Regular Contributor

We've installed a fix for this for version 4.33, which is planned for release in June. Paging will be disabled when the maxPageCount is set to 0 or 1. You can test out this fix on the /next version of the SDK: https://js.arcgis.com/next

Let us know if you have any feedback - thanks!

mikkokärkkäinen
Emerging Contributor

Wow, this sounds great, thank you! I'll try to find time to test out the "next" version before the June release.

Thank you!

0 Kudos