Hello, I've been trying to create a sample application that uses a WFS layer from a locally hosted GeoServer but I can't figure it out how to do it.
I managed to use a WMS service with the following code:
WmsLayer {
url: "http://localhost:8080/geoserver/wms"
layerNames: ["Test:tbl_furos_coordenadas_2"]
} And I've tried this to WFS but to no avail:FeatureLayer{id: gtLayername: "Test"WfsFeatureTable {id: gtTableurl:"http://localhost:8080/geoserver/Test/wfs"tableName: "tbl_furos_coordenadas_2"featureRequestMode: Enums.FeatureRequestModeManualCacheonLoadStatusChanged: {if (loadStatus !== Enums.LoadStatusLoaded)return;populateWfsFeatureTable();}
}
But nothing happens. Is there something I'm missing?
Solved! Go to Solution.
did you try out this sample? arcgis-runtime-samples-qt/DisplayWfsLayer.qml at master · Esri/arcgis-runtime-samples-qt · GitHub
if you swap out the url and tableName, it should work. If it doesn't perhaps the URL is formatted wrong? I also notice you are setting the FeatureLayer.name property, but that is read-only (LayerContent QML Type | ArcGIS for Developers )
Can you connect to the errorChanged signal and see if you get any errors:
WfsFeatureTable {
onErrorChanged: {
console.log(error.message, error.additionalMessage);
}
}
FeatureLayer {
onErrorChanged: {
console.log(error.message, error.additionalMessage);
}
}
did you try out this sample? arcgis-runtime-samples-qt/DisplayWfsLayer.qml at master · Esri/arcgis-runtime-samples-qt · GitHub
if you swap out the url and tableName, it should work. If it doesn't perhaps the URL is formatted wrong? I also notice you are setting the FeatureLayer.name property, but that is read-only (LayerContent QML Type | ArcGIS for Developers )
Can you connect to the errorChanged signal and see if you get any errors:
WfsFeatureTable {
onErrorChanged: {
console.log(error.message, error.additionalMessage);
}
}
FeatureLayer {
onErrorChanged: {
console.log(error.message, error.additionalMessage);
}
}
Sorry for the late answer, I'm gonna try this, thank you.
We're not using it anymore so I'm not in need of this right now. Thank you for your help!