-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[WFS] Add startIndex Support in URL generation and supportsStartIndex Method #44
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!! see my comment about the version check in the URL generation; Also it'd be nice to have an added test in the url.spec.ts file to demonstrate this new param :)
src/wfs/url.ts
Outdated
@@ -51,6 +53,15 @@ export function generateGetFeatureUrl( | |||
const extentJoined = extent.join(','); | |||
newParams.BBOX = extentCrs ? `${extentJoined},${extentCrs}` : extentJoined; | |||
} | |||
if (startIndex !== undefined) { | |||
if (version >= '2.0.0') { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you can remove this check altogether; many implementations (inc. GeoServer) will support startIndex even using lower versions of WFS, so adding it anyway cannot hurt. On the other side, since we now provide a supportsStartIndex
method in the endpoint, it is up to the application code to handle the case where this might have no effect at all (e.g. disabling a field).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, sounds correct.
I have made the suggested updates
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perfect, thanks!!
This PR includes the following updates:
startIndex
in thegetFeatureUrl
andgenerateGetFeatureUrl
functionssupportsStartIndex
method in theWfsEndpoint
class.