-
Notifications
You must be signed in to change notification settings - Fork 55
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
feature: Extend layerSpecificExport for APIs #2053
base: master
Are you sure you want to change the base?
feature: Extend layerSpecificExport for APIs #2053
Conversation
A lot of things to test, so I haven't had the time to test yet as it requires some hefty set up to actually test the export result handling. Guess I will just test that old functionality is not broken and configuration is backwards compatible. But the silent parameter, why not just set it to null or empty string? Null could be sent as completely empty and empty string "PARAM=" if there is a difference between "PARAM" and "PARAM=" in the backend. The {{}} notation is not really intuitive and can potentially interfere with a future variable substitution syntax by disallowing the variable name "no_value" (whoever calls a variable that) |
We have a backend that cares about the trailing equals sign, so I changed it to either _null_ or empty string which results in |
Fixes #2040.
The PR includes several improvements to the layerSpecificExport handling to make the configuration more flexible and adaptable to more different types of APIs. It does not include authentication in any way, but that would be a useful next addition.
exportedFileName
andbutton
per layer or specific URLurl
) can be set as defaults per layer, or overriden for specific export URLs.urlParameters
attribute
property:{ "attribute": "objekt_id", "separator": ";"}
. The separator character can be customized but uses semicolon by default.{{no_value}}
to add the parameter without the equals sign or value.requestMethod
(POST_JSON
|OPEN
|GET
) anddisplayExportResponse
(true
|false
) addedPOST_JSON
is the default option and posts JSON the usual way as the layerSpecificExport works.OPEN
opens the URL in a new window.GET
makes a GET requesturlParameters
specified (but notattributesToSendToExport
of course)displayExportResponse
is set totrue
(for the layer or the specific url) the request's response will be displayed in the infowindow. Supports images and text (if from the same domain or otherwise allowed by CORS restrictions). Defaults to false.article
because it looks nice for opening reports etc.