How can we initialize a map in qml with a feature layer that is already filtered?
Solved! Go to Solution.
Are you wanting to use a definition expression? - ArcGIS Runtime SDK for Qt QML API: FeatureLayer Class Reference
It should apply any definition expression you have set in the service automatically, but if it does not, then the workaround I can think of is to fetch the feature service info (http://developersdev.arcgis.com/qt/qml/api-reference/class_service_info_task.html#a6e6f2d90fb96340e7... , and from the feature service info, get the feature layer info for your layer (http://developersdev.arcgis.com/qt/qml/api-reference/class_feature_service_info.html#aa7efab2f879390... ). Once you have the FeatureLayerInfo for your layer, you can obtain the def expression string, and apply it to your layer http://developersdev.arcgis.com/qt/qml/api-reference/class_feature_layer_info.html#a3d3237fca07c8bce...
- Luke
Are you wanting to use a definition expression? - ArcGIS Runtime SDK for Qt QML API: FeatureLayer Class Reference
It should apply any definition expression you have set in the service automatically, but if it does not, then the workaround I can think of is to fetch the feature service info (http://developersdev.arcgis.com/qt/qml/api-reference/class_service_info_task.html#a6e6f2d90fb96340e7... , and from the feature service info, get the feature layer info for your layer (http://developersdev.arcgis.com/qt/qml/api-reference/class_feature_service_info.html#aa7efab2f879390... ). Once you have the FeatureLayerInfo for your layer, you can obtain the def expression string, and apply it to your layer http://developersdev.arcgis.com/qt/qml/api-reference/class_feature_layer_info.html#a3d3237fca07c8bce...
- Luke
Thank Luke You are always very helpful