-
Notifications
You must be signed in to change notification settings - Fork 25
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
Request geometry from API #1282
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.
Menu is shown for point geometry before the geometry is returned from the response.
Menu needs to appear only when the geometry from the request is returned!
The geometry edit method will no longer append the delete button if the field is the current layer geometry. |
This issue is caused by starting the draw interaction without setting drawend: null. |
Nice thanks! @dbauszus-glx. Is there anything else that is outstanding on this? |
I am not aware of issues. |
Quality Gate passedIssues Measures |
The aim of this PR is to allow the geometry entry to be extended by API calls.
Instead of copy and pasting most of the geometry entry script to create custom entry types for geometries which are requested from an API it should be possible to provide an entry.api method which will be called within the geometry entry show method if no value is available in the entry.show() method.
The entry.show() method must be async to allow for blocking api calls. The default is non-blocking.
It should be possible to provide edit controls to request geometries but also to use default and/or custom draw methods.
It should also be possible to modify geometries received from an API.
Any styling must only be applied by the geometry entry method.
For now geometries will always be stored as 'geojson' which will be turned to the native postgis geometry format in the location_update template.
However it should be possible to request and display other Openlayers supported formats. The new
mapview.geometry()
method supports any OL format. Themapview.geoJSON()
method will set the geojson format before calling the geometry method.The geometry created by the mapview.geometry() method should not be stored on the params object to prevent having to delete this object if the value updates.
The location_get method would not return a response if all fields are null. This has been resolved by concatenating the _.layer.qID with the fields array.
The geojson.js query template was bugged. Where
IS NOT NULL
is provided with the geom if now viewport is set.The vector_layer entry method has been extended to apply theme styles and support API methods as well. However this work is incomplete and would too far extend of this PR. I have created a ticket to eventually merge the vector_layer and mvt_clone layer to support API calls, allow for the modification of geometries, and allow to draw new geometries. #1268
A render event was added to the location view element.
This allows for rendering the location view again without update.