qgis / qwc2-demo-app

QWC2 demo application
Other
243 stars 155 forks source link

Editing Dataset fails #370

Closed Chris98RUB closed 2 years ago

Chris98RUB commented 2 years ago

Hello people,

in my configuration of QWC2, i try to set up an editable dataset. If i try to add new data to this dataset by committing in the Editing-Tool, nothing happens. Picking an existing object is also unavailable. I've enabled the editing-tool in "config.json" and "appConfig", set up the "editServiceUrl" with my WMS QGis Server link and also the "editConfig"-part in "themes.json". For editing, i use the default editing interface.

Does somebody may know the reason why it does not work?

Thanks in advance Chris

manisandro commented 2 years ago

Probably due to CORS - did you check the browser console for any messages?

Chris98RUB commented 2 years ago

I have activated the CorsE-plugin for Firefox. Requests for feature infos are working. When i want to add a new dataset, nothing is shown in the browser console and nothing happens. When i want to pick a feature by the editing-Tool there is a message "Uncaught (in promise) TypeError: feature is null".

manisandro commented 2 years ago

What does the network pane show?

Chris98RUB commented 2 years ago
Unbenannt

It shows this.

manisandro commented 2 years ago

This is the browser console, not the network pane

Chris98RUB commented 2 years ago
Unbenannt

Is this the right one?

manisandro commented 2 years ago

Yes, but the requests of interest would be the ones relating to the data service.

Chris98RUB commented 2 years ago
Unbenannt

When i like to pick a point, these are the requests.

manisandro commented 2 years ago

These are all requests to the QGIS Server, there appears to be no data service involved

Chris98RUB commented 2 years ago

So could it be, that the "editServiceUrl" is wrong?

manisandro commented 2 years ago

Possibly, though I'd expect a request to show up in the network pane, unless the URL is empty.

Chris98RUB commented 2 years ago

Which URL do you mean? "http://xxx.xxx.xx.xx/cgi-bin/qgis_mapserv.fcgi?VERSION%3D1.3.0%26map%3D/home/name/Test_Codes_Ueberarbeitung.qgs" is my QGIS-Server URL. Can i deduce maybe a right "editServiceUrl" out of this ? Mabye the dataset filename have to be included? Tanks a lot.

manisandro commented 2 years ago

For editing you need a data service set up, see https://github.com/qwc-services/qwc-data-service for details.

Chris98RUB commented 2 years ago

Thank you for this link. But I don't understand what to do for achiving this editable data service. Do I have to configure the qwc-docker container to use the QWC data service?

I configured my QWC2 Map Viewer. But how can I implement the data service with my own Database into my QWC2 Map Viewer?

Thanks Chris

manisandro commented 2 years ago

Please look at https://github.com/qwc-services/qwc-docker for a full sample setup.