koopjs / FeatureServer

An open source Geoservices Implementation (deprecated)
https://geoservices.github.io
Other
104 stars 32 forks source link

Incorrect behavior for exceededTransferLimit property #141

Closed jkerr5 closed 5 years ago

jkerr5 commented 5 years ago

It looks like Koop will only set exceededTransferLimit to true if the limit requested is greater than the maxRecordCount but I don't think that is the correct behavior if the resultOffset and resultRecordCount parameters are being used.

This is the relevant code in Koop: https://github.com/koopjs/FeatureServer/blob/8244faf6bfaeb949a1d7ac71a9c8e0af50f634f8/src/templates.js#L78

According to the Esri docs, exceededTransferLimit should be true if the service has more features beyond the limit that the client requested. From https://developers.arcgis.com/rest/services-reference/query-feature-service-layer-.htm

The exceededTransferLimit property is now included in the JSON response when paging through a query result with the resultOffset and resultRecordCount parameters. When exceededTransferLimit is true, it indicates there are more query results and you can continue to page through the results. When exceededTransferLimit is false, it indicates that you have reached the end of the query results.

Exceeding maxRecordCount is a special case only in play if resultOffset and resultRecordCount parameters are not being used.

With the current behavior, clients cannot use this to do pagination through the results.

rgwozdz commented 5 years ago

Fix in 2.16.4

rgwozdz commented 5 years ago

@jkerr5 - have you had the opportunity to confirm that this is fixed in 2.16.4?

jkerr5 commented 5 years ago

I haven't. I should have this week to do it along with check on the Insights issue.

rgwozdz commented 5 years ago

@jkerr5 - any update on this?

jkerr5 commented 5 years ago

I apologize for not getting back to this @rgwozdz I've ended up having to focus on some other things the last month. I hope to get back to this project sometime soon though.

rgwozdz commented 5 years ago

Closing due to inactivity. Fix in 2.16.4.