I have a map with multiple feature layers.
I'm trying to identify a layer that is clicked on but I do not know which one will be clicked
So I have this line of code which as I understand it should accomplish what I want to do
mapView.identifyLayersWithMaxResults(mouse.x, mouse.y, 22, false, 1);
which should trigger in here
but instead what happens this line of code mapView.identifyLayersWithMaxResults(mouse.x, mouse.y, 22, false, 1);
crashes my app everytime
I was trying to follow the instructions per
Identify features—ArcGIS Runtime SDK for Qt | ArcGIS for Developers
Identify features in all feature layers
When you do not know which specific layer to identify on, you can identify items in any layer in the map or scene. Change the first workflow above so that you do not specify the layer to identify. This time, the results are returned as a list of instead of a single result.
Layers that do not support identify or do not have any results based on the inputs are not included in the returned list.
That is weird, are you running it in the AppStudio AppRun? AppStudio Player? What device(s) are you using?
Do you see any error message(s) in the console when the app crashes?
cc: ArcGIS Runtime SDK for Qt , to see anyone in this group know anything about this specific issue.
So I was running App Studio 3.053, upgraded to the latest release(3.1) and this solves my issue the crash stops and I'm able to get past to the onIdentifyLayersStatusChange event.
I do have a follow up question, is it possible to select a feature using this process as well? Since I don't know the feature layer its selecting and the only way I know how to select a feature is featureLayer.selectFeatures()
Just to make sure I'm understanding this correctly
anything retrieved by
will return in a variable defined like this
because so far any feature I click on returns empty or null variables