Select to view content in your preferred language

identifyLayersWithMaxResults crashes app

1152
10
10-25-2018 08:37 AM
KyleSchultz1
Emerging Contributor

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

    onIdentifyLayerStatusChanged: {

      }

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 IdentifyLayerResult 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.

0 Kudos
10 Replies
LucasDanzinger
Esri Frequent Contributor

Based on this info, I don't know why it is crashing. But one thing to note is that you are calling identifyLayers with an "s" but your signal is set up for identifyLayer (singular). Instead it should be:

onIdentifyLayersStatusChanged: {