Select to view content in your preferred language

Issue Identifying Single Features in Clustered Layers using identifyLayers

217
6
Jump to solution
2 weeks ago
t-schaal
Emerging Contributor

Hello everyone,

We're currently using the identifyLayers function from MapViewProxy to identify features in our layers. This generally works well, but we've noticed an issue with layers where clustering is enabled:

Clicking on a cluster returns the expected result using identifyLayers.
Clicking on a single, non-clustered feature does not return a result.

Is this an issue of identifyLayers, or is there a better way to reliably identify all features, including non-clustered ones, in clustered layers?

We considered using identify(on layer: ArcGIS.Layer) as shown in this example . However, since we have multiple layers, calling this function repeatedly for each layer is not ideal.

Any suggestions or best practices would be appreciated—thanks in advance!

0 Kudos
1 Solution

Accepted Solutions
t-schaal
Emerging Contributor

Thanks! I found the issue. We were setting maximumResultsPerLayer to nil, which caused problems identifying single features. Leaving it unset fixed the issue for us. 🙂

View solution in original post

0 Kudos
6 Replies
t-schaal
Emerging Contributor

let result = try? await proxy.identifyLayers(...)
-> result is an empty array here if clustering is active for the layer and you click on a single feature that is not clustered

0 Kudos
Ting
by Esri Regular Contributor
Esri Regular Contributor

Thanks for reaching out. Can you let me know the environment and versions you are using? Specifically, are you building with Xcode 26.0 when you see this problem? Thanks.

 

OS version: 

Xcode version:

Target type: (iPhone, Simulator, Mac Catalyst)

Target version:

SDK version:

0 Kudos
t-schaal
Emerging Contributor

OS version: currently iOS 26 but it also occured on older OS versions

Xcode version: 16.4

Target type: iPhone

Target version: iPhone 15 Pro

SDK version: 200.8.0

0 Kudos
Ting
by Esri Regular Contributor
Esri Regular Contributor

Want to check in if you have received my DM and been able to run the snippet.

Just want to check, are you setting the `maximumResult` count on the identify method?

0 Kudos
t-schaal
Emerging Contributor

Thanks! I found the issue. We were setting maximumResultsPerLayer to nil, which caused problems identifying single features. Leaving it unset fixed the issue for us. 🙂

0 Kudos
Ting
by Esri Regular Contributor
Esri Regular Contributor

Thanks for the update. This might be a bug and we are looking into fixing it on our end. Glad it worked out.

0 Kudos