Hi, I'm using Esri ArcGIS Runtime Version 100.15 (WPF) and trying to integrate OGC Layers into my App.
I'm creating the layer as follows:
var featureTable = new OgcFeatureCollectionTable(new Uri(layer.Path), layer.Layers);
var featureLayer = new FeatureLayer(featureTable);
MapView.Map.OperationalLayers.Add(featureLayer);
This works with the following Demo-Service: https://demo.ldproxy.net/daraa (Layer: AeronauticCrv)
But with my Service, I'm getting the Error: Esri.ArcGISRuntime.ArcGISRuntimeException: JSON parser invalid token: Error processing OGC_feature service JSON response
The layer ist hosted on a QGIS Server.
In the background there are three requests made by ArcGIS (random order):
1. {{myService}}/wfs3/conformance?f=json:
{
"conformsTo": [
"http://www.opengis.net/spec/ogcapi-features-1/1.0/conf/core",
"http://www.opengis.net/spec/ogcapi-features-1/1.0/conf/oas30",
"http://www.opengis.net/spec/ogcapi-features-1/1.0/conf/html",
"http://www.opengis.net/spec/ogcapi-features-1/1.0/conf/geojson"
],
"links": [
{
"href": "{{myService}}/wfs3/conformance.json?f=json",
"rel": "self",
"title": "WFS 3.0 conformance classes as JSON",
"type": "application/json"
},
{
"href": "{{myService}}/wfs3/conformance.html?f=json",
"rel": "alternate",
"title": "WFS 3.0 conformance classes as HTML",
"type": "text/html"
}
],
"timeStamp": "2024-04-02T13:27:53Z"
}
2. {{myService}}/wfs3/?f=json:
{
"links": [
{
"href": "{{myService}}/wfs3.json?f=json",
"rel": "self",
"title": "Landing page as JSON",
"type": "application/json"
},
{
"href": "{{myService}}/wfs3.html?f=json",
"rel": "alternate",
"title": "Landing page as HTML",
"type": "text/html"
},
{
"href": "{{myService}}/wfs3/collections?f=json",
"rel": "data",
"title": "Feature collections",
"type": "application/json"
},
{
"href": "{{myService}}/wfs3/conformance?f=json",
"rel": "conformance",
"title": "Conformance classes",
"type": "application/json"
},
{
"href": "{{myService}}/wfs3/api?f=json",
"rel": "service-desc",
"title": "API description",
"type": "application/vnd.oai.openapi+json;version=3.0"
}
],
"timeStamp": "2024-04-02T13:50:57Z"
}
3. {{myService}}/wfs3/collections:
{
"collections": [
{
"crs": [
"http://www.opengis.net/def/crs/OGC/1.3/CRS84",
"http://www.opengis.net/def/crs/EPSG/0/2056"
],
"description": "",
"extent": {
"spatial": {
"bbox": [
[
8.5432806926619662,
47.277310340812157,
8.5797099388509857,
47.301822424772524
]
],
"crs": "http://www.opengis.net/def/crs/OGC/1.3/CRS84"
},
"temporal": {
"interval": null,
"trs": "http://www.opengis.net/def/uom/ISO-8601/0/Gregorian"
}
},
"id": "{{myLayer}}",
"links": [
{
"href": "{{myService}}/wfs3/collections/{{myLayer}}/items.json?f=json",
"rel": "item",
"title": "{{myLayer}} as GeoJSON",
"type": "application/geo+json"
},
{
"href": "{{myService}}/wfs3/collections/{{myLayer}}/items.html?f=json",
"rel": "item",
"title": "{{myLayer}} as HTML",
"type": "text/html"
}
],
"title": "{{myLayer}}"
},
...
],
"crs": [
"http://www.opengis.net/def/crs/OGC/1.3/CRS84",
"http://www.opengis.net/def/crs/EPSG/0/2056"
],
"links": [
{
"href": "{{myService}}/wfs3/collections.json?f=json",
"rel": "self",
"title": "Feature collections as JSON",
"type": "application/json"
},
{
"href": "{{myService}}/wfs3/collections.html?f=json",
"rel": "alternate",
"title": "Feature collections as HTML",
"type": "text/html"
}
],
"timeStamp": "2024-04-02T13:50:57Z"
}
I also tried to load the layer in the online ArcGIS MapViewer but this also didn't work and didn't give me any more information.
Does anyone have an Idea what the problem could be? What are the conformance requirements of the .Net Maps SDK?
Hi Tim,
The generic JSON error that you are getting tells me something went wrong when parsing the response from
"{myService}/wfs3/collections/{myLayer}/items?f=json"
I'll be happy to investigate this problem further if you can provide a link to your OGC API - Features service that I can test with.
Thank you,
Hisham
Hi Hisham,
I think the problem has to be within the three requests I posted originally. I'm using a proxy to view all the requests made by ArcGIS and the layer/collection itself is never queried.
These are the only requests made:
Thank you,
Tim
Hi Tim,
The above three responses that you shared seem OK to me. At this point, I need to reproduce the problem on my machine to conduct further investigation. Please host any sample service on a QGIS Server and share the landing page with me.
Thanks,
Hisham
Hi Hisham
The service I'm trying to integrate is reachable under the following address: https://th_sambesi.ogc.thalwil.ch/wfs3
Thank you,
Tim
Hi Tim,
Thanks for sharing the landing page for your service. I was able to reproduce the problem. We currently rely on servers following the common URL pattern for retrieving items i.e., "myService}/wfs3/collections/{myLayer}/items?f=json"; however, this service only works with a specific pattern https://th_sambesi.ogc.thalwil.ch/wfs3/collections/hydrant/items.json
We will enhance our client to recognize custom URL patterns in the server metadata. We already have an internal dev issue for this improvement.
Thanks,
Hisham
Hi Hisham,
Thank you for analyzing my issue.
Can you give me any information on when a solution will be released?
Thanks,
Tim
Hi,
Are there any updates on the status of this issue?
Is there any plan to release the client's enhancement to recognize custom URL patterns in the server metadata anytime soon?