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

Fetch feature info in application/geo+json format #1504

Merged
merged 2 commits into from
Mar 24, 2022

Conversation

johnnyblasta
Copy link
Collaborator

Closes #1497

Example config:

  "source": {
    "local": {
      "url": "http://localhost/geoserver/wms"
    },
    "lstY-strandskydd": {
      "url": "https://ext-geodata-lokala.lansstyrelsen.se/arcgis/services/LSTY/lsty_wms_strandskydd/MapServer/WMSServer"
    }
  },
  "layers": [
    {   "name": "0",
            "title": "LST Strandskyddsdispenser",
            "queryable": true,
            "visible": false,
            "type": "WMS",
            "group": "root",
            "source": "lstY-strandskydd",
            "style": "Strandskyddsdispenser",
            "infoFormat": "application/geo+json"
        },

@Grammostola
Copy link
Contributor

Hi, I think it looks pretty good, well done. One bit of variability, so far isolated to one arcgis server, is:

        <Format>application/vnd.esri.wms_raw_xml</Format>
        <Format>application/vnd.esri.wms_featureinfo_xml</Format>
        <Format>application/vnd.ogc.wms_xml</Format>
        <Format>application/geojson</Format>
        <Format>text/xml</Format>
        <Format>text/html</Format>
        <Format>text/plain</Format>

whereas your proposed change works well when it looks like so:

        <Format>application/vnd.esri.wms_raw_xml</Format>
        <Format>application/vnd.esri.wms_featureinfo_xml</Format>
        <Format>application/vnd.ogc.wms_xml</Format>
        <Format>application/geo+json</Format>
        <Format>text/xml</Format>
        <Format>text/html</Format>
        <Format>text/plain</Format>

I shall query whether the singular arcgis server has any relevant local configuration (though I can't quite see how that would be the case). Maybe your proposed change could recognize both of the above variants if both are valid.

@johnnyblasta
Copy link
Collaborator Author

Hi, I think it looks pretty good, well done. One bit of variability, so far isolated to one arcgis server, is:

        <Format>application/vnd.esri.wms_raw_xml</Format>
        <Format>application/vnd.esri.wms_featureinfo_xml</Format>
        <Format>application/vnd.ogc.wms_xml</Format>
        <Format>application/geojson</Format>
        <Format>text/xml</Format>
        <Format>text/html</Format>
        <Format>text/plain</Format>

whereas your proposed change works well when it looks like so:

        <Format>application/vnd.esri.wms_raw_xml</Format>
        <Format>application/vnd.esri.wms_featureinfo_xml</Format>
        <Format>application/vnd.ogc.wms_xml</Format>
        <Format>application/geo+json</Format>
        <Format>text/xml</Format>
        <Format>text/html</Format>
        <Format>text/plain</Format>

I shall query whether the singular arcgis server has any relevant local configuration (though I can't quite see how that would be the case). Maybe your proposed change could recognize both of the above variants if both are valid.

These variants are probably exactly the same in the response, but should be requested with the specific format so the code has to be modified a bit.

@johnnyblasta
Copy link
Collaborator Author

Made a fix that should handle the varying string for the same format. @Grammostola can you test it on the server?

@Grammostola
Copy link
Contributor

Looks good and works well

@johnnyblasta johnnyblasta merged commit ffb99dd into master Mar 24, 2022
@johnnyblasta johnnyblasta deleted the featinfo-geojson branch March 24, 2022 15:29
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.

WMS GetFeatureInfo application/geo+json option
2 participants