geosolutions-it / geonode-mapstore-client

MapStore Client for GeoNode
Other
2 stars 131 forks source link

Not all fields are visible as text rule labels in the style editor #206

Closed simboss closed 3 years ago

simboss commented 3 years ago

Some attribute table fields of this layer is not present in the label options of the style editor.

How to reproduce

Current Result The name and location fields are not present In the Label dropdown menu

ATTRIBUTE TABLE attribute table

TEXT RULE - LABEL text rule

simboss commented 3 years ago

@allyoucanmap can you have a look?

allyoucanmap commented 3 years ago

@simboss took a quick look and it seems the WFS DescribeFeatureType does not return those attributes

https://master.demo.geonode.org/geoserver/ows?service=WFS&version=1.1.0&typeName=geonode%3Afamous_classical_music_composers&request=DescribeFeatureType

image

if you need those values the style editor allows you to add variables not listed using this structure {{variableName}}

image image

giohappy commented 3 years ago

Apparently the XML response of the DescribeFeatureType doesn't include those fields, while the JSON response does.

https://master.demo.geonode.org/gs/ows?service=WFS&version=1.1.0&request=DescribeFeatureType&typeName=geonode:famous_classical_music_composers&outputFormat=application/json&access_token=None

{
   "elementFormDefault":"qualified",
   "targetNamespace":"http://www.geonode.org/",
   "targetPrefix":"geonode",
   "featureTypes":[
      {
         "typeName":"famous_classical_music_composers",
         "properties":[
            {
               "name":"fid",
               "maxOccurs":1,
               "minOccurs":1,
               "nillable":false,
               "type":"xsd:int",
               "localType":"int"
            },
            {
               "name":"the_geom",
               "maxOccurs":1,
               "minOccurs":1,
               "nillable":false,
               "type":"gml:Point",
               "localType":"Point"
            },
            {
               "name":"name",
               "maxOccurs":1,
               "minOccurs":0,
               "nillable":true,
               "type":"xsd:string",
               "localType":"string"
            },
            {
               "name":"location",
               "maxOccurs":1,
               "minOccurs":0,
               "nillable":true,
               "type":"xsd:string",
               "localType":"string"
            },
            {
               "name":"date",
               "maxOccurs":1,
               "minOccurs":0,
               "nillable":true,
               "type":"xsd:string",
               "localType":"string"
            },
            {
               "name":"audio",
               "maxOccurs":1,
               "minOccurs":0,
               "nillable":true,
               "type":"xsd:string",
               "localType":"string"
            },
            {
               "name":"image",
               "maxOccurs":1,
               "minOccurs":0,
               "nillable":true,
               "type":"xsd:string",
               "localType":"string"
            }
         ]
      }
   ]
}
allyoucanmap commented 3 years ago

@simboss @giohappy confirm and the attribute table is using the json one

giohappy commented 3 years ago

closing because this is also managed in https://github.com/geosolutions-it/support/issues/1482