AGSArcGISMapImageLayer and Identify

1318
15
04-16-2018 07:06 AM
ToddAtkins
Occasional Contributor

How does one execute an Identify task on an instance of AGSArcGISMapImageLayer? I've got a number of feature layers already on the map and running identifyLayersAtScreenPoint:tolerance:returnPopupsOnly:maximumResultsPerLayer:completion:() works as expected, but returns no results for the AGSArcGISMapImageLayer. In fact, the AGSArcGISMapImageLayer shows isPopupEnabled = false. The layer source is Tapestry Segmentation layer from:  http://beitzanddaighgeo.maps.arcgis.com/home/item.html?id=eda0f20edc8448adaa3373cce237a57f and the layer is rendered correctly on the map.

Likely I'm missing something here, but how does one setup an AGSArcGISMapImageLayer so that it may be identified?

Thanks.

Tags (1)
0 Kudos
15 Replies
MarkDostal
Esri Contributor

Todd,

Thanks for the additional information.  

I will look into your crash and see if I can reproduce it.  One thing to try would be to add the "All C++ Exceptions" breakpoint and see if it hits that breakpoint during the identify operation.

Mark

0 Kudos
ToddAtkins
Occasional Contributor

Thanks for your help, Mark. I set a breakpoint for All C++ Exceptions and it's not giving me any additional info than what I posted earlier--it's breaking at the same spot with the same exception.

0 Kudos
MarkDostal
Esri Contributor

Todd,

I am able to reproduce the crash you reported and will pass it on to the appropriate people on the team.  In the meantime, I will see if there are any possible work-arounds.

Thank you for your patience,

Mark

ToddAtkins
Occasional Contributor

Mark, thank you very much for your time and help. I'm going to fiddle around with some ideas for a workaround on our end as well.

0 Kudos
MarkDostal
Esri Contributor

Todd,

We've done some research on our end and found the issue is with the number of fields in the data.  The limit in the Runtime SDK is 2,000 fields.  The data you're using has more than that, which is causing the crash.  We are in the process of fixing that crash for our next release, but the real solution for you would be to architect the data to have less than 2k fields.

Question:  are you able to create and use hosted feature layers with your solution?  If so, you can take a look at this documentation (Manage hosted feature layers—ArcGIS Online Help | ArcGIS ), which will explain how to create a "view" where you define what fields (among other things) you want in your data.  This has the dual benefit only only bringing in the data you're interested in but also should be faster and prevent the crash.

If you're not able to use hosted feature layers, let me know.

Mark

0 Kudos
ToddAtkins
Occasional Contributor

Mark thanks for the follow up. Unfortunately we cannot create a feature

view for this layer since it is a Dynamic Map service and one of the Esri

Premium Living Atlas layers.

To work around the issue for now, we've created a service in our own AGOL

with the geometry and fields we're trying to use. It works, however it

isn't ideal since it's disconnected from Esri's authoritative data thus

updates require a manual process on our end. It's also a Feature Service

where we'd ideally like to use a Dynamic Map service for the sake of speed.

Plus, we'd obviously prefer not to spend credits on essentially duplicating

an ready-to-go layer.

Looking forward to trying it out in the next release though and seeing how

it goes.

-Todd

0 Kudos