I have a feature table set up
and a combo box with two values
ServiceFeatureTable {
id: featureTable
url: featureUrl }
ComboBox {
id: departmentBox
model: featAttributes
function urlChange(){
if(departmentBox.currentText=='Water'){
featureUrl='/FeatureServer/3'
}else if(departmentBox.currentText=='Sewer'){
featureUrl='/FeatureServer/1'
}
}
onCurrentIndexChanged:urlChange()
}
On the change of the combo box I'd like to reload the service feature table to a different feature service.
The method I've tried up here fails
Solved! Go to Solution.
You need to get the "operationalLayers" properties from the Map object, Map QML Type | ArcGIS for Developers , then it would return you "LayerListModel" LayerListModel QML Type | ArcGIS for Developers, that you can append or remove Layer object to/from.
Kyle,
I think you need to have two separate Feature Layers with each ServiceFeatureTable, then add or remove the layer on the ComboBox IndexChanged event listener.
Looping in ArcGIS Runtime SDK for Qt, to see if anyone from that group has more information.
Thank you,
Erwin
Do you know how to properly add or remove a layer? Documentation doesn't specify from what I see
You need to get the "operationalLayers" properties from the Map object, Map QML Type | ArcGIS for Developers , then it would return you "LayerListModel" LayerListModel QML Type | ArcGIS for Developers, that you can append or remove Layer object to/from.