planetfederal / qgis-webappbuilder-plugin

GNU General Public License v3.0
18 stars 20 forks source link

Only non empty columns are shown in the table of attributes #339

Open gioman opened 7 years ago

gioman commented 7 years ago

This has been observed in uploaded layers (KML).

If the KML has an attribute column that is completely empty then is not shown in the table in webapps. Attached two samples.

gioman commented 7 years ago

samples_kml.zip

bartvde commented 7 years ago

The schema part of a KML is not read by OpenLayers, so we can only inspect the keys of an actual feature

bartvde commented 7 years ago

The schema part is read, but only inline, not with schemaUrl

bartvde commented 7 years ago

No sorry upon reading the code again in openlayers it's not parsed

<Schema name="wb" id="wb">
        <SimpleField name="fips" type="string"></SimpleField>
        <SimpleField name="iso2" type="string"></SimpleField>
        <SimpleField name="iso3" type="string"></SimpleField>
        <SimpleField name="un" type="float"></SimpleField>
</Schema>

So I don't see an easy fix for this

bartvde commented 7 years ago

maybe the JSONIX KML reader can extract the schema but I'm not sure if it's worth the trouble and the second parse

gioman commented 7 years ago

The problem is that you can have uploaded kml files that do not show any attribute at all, not nice as user experience. But agree that this could be considered a minor issue at the moment compared to others.