qwc-services / qwc-config-generator

QWC Config Generator
2 stars 12 forks source link

Generating featureInfoConfig.json for empty QGIS project results in error #62

Closed danceb closed 1 year ago

danceb commented 1 year ago

I have an empty default theme which doesn't contain any layers and just shows the background map instead.

Regarding this the generating of the featureInfoConfig.json results in the error * None is not of type 'object', while it is expecting any layer within to QGIS project file which it's not the case.

Could there be an exception that the featureInfo configuration is still generated even with an empty QGIS project?

manisandro commented 1 year ago

Works fine here, however you need to manually define a theme extent to prevent a viewer exception.

Can you post a full stacktrace of the generator exception?

danceb commented 1 year ago

ok, found the issue. Config generating works fine.

Within the project file in the wms settings there was the "exclude layers" option checked. Because the layers named there weren't a part of the project anymore the config generator didn't find them, which resulted in the error. But I think that's not something the generator should be aware of, because it's a bad project setting by the user itself.