Skip to content
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

GetFeatureInfo - The XML can be a BoundingBox item and not a Layer item #61

Merged
merged 1 commit into from
Jan 29, 2024

Conversation

Gustry
Copy link
Member

@Gustry Gustry commented Jan 29, 2024

Related to support 2700

pmaster_test_qgis  | <GetFeatureInfoResponse>
lizmapmaster_test_qgis  |  <BoundingBox minx="695509.79609185" maxy="6321556.88189175" maxx="695509.79609185" CRS="EPSG:2154" miny="6321556.88189175"/>
lizmapmaster_test_qgis  |  <Layer name="dnd_form_geom">
lizmapmaster_test_qgis  |   <Feature id="1">
lizmapmaster_test_qgis  |    <Attribute name="id" value="1"/>
lizmapmaster_test_qgis  |    <Attribute name="field_in_dnd_form" value="test_geom"/>
lizmapmaster_test_qgis  |    <Attribute name="field_not_in_dnd_form" value="test_geom"/>
lizmapmaster_test_qgis  |    <BoundingBox minx="695509.79609185" maxy="6321556.88189175" maxx="695509.79609185" CRS="EPSG:2154" miny="6321556.88189175"/>
lizmapmaster_test_qgis  |    <Attribute name="geometry" value="Point (695509.79609185 6321556.88189175)" type="derived"/>
lizmapmaster_test_qgis  |   </Feature>
lizmapmaster_test_qgis  |  </Layer>
lizmapmaster_test_qgis  | </GetFeatureInfoResponse>

@mdouchin I have the display of DND tabs in the attribute table

image

@Gustry Gustry requested a review from rldhont January 29, 2024 14:42
@Gustry
Copy link
Member Author

Gustry commented Jan 29, 2024

It fixes the previous error :

aster_test_qgis  | Traceback (most recent call last):
lizmapmaster_test_qgis  |   File "/srv/qgis-server-plugins/lizmap_server/get_feature_info.py", line 248, in responseComplete
lizmapmaster_test_qgis  |     xml = self.append_maptip(xml, result.layer.name(), result.feature_id, value)
lizmapmaster_test_qgis  |   File "/srv/qgis-server-plugins/lizmap_server/get_feature_info.py", line 53, in append_maptip
lizmapmaster_test_qgis  |     if layer.attrib['name'] != layer_name:
lizmapmaster_test_qgis  | KeyError: 'name'

@Gustry Gustry merged commit 4c14094 into 3liz:master Jan 29, 2024
6 checks passed
@Gustry Gustry deleted the getfeatureinfo branch January 29, 2024 15:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants