IdentifyLayerAsync is not returning all features in Version 100.2.0. It is working fine with version 100.1.0. Using Fiddler I compared the two versions and discovered this method was completely re-written. The previous version utilized the Identify REST endpoint of the map service. One simple transaction. The latest version uses the Query endpoint, one for each visible layer. That is 20+ transactions in my case and is noticeably slower.
I have discovered two or more problems.
Problem 1: The Query generated by IdentifyLayerAsync fails to return the feature in some cases. I noticed the failing Query result includes the error “exceededTransferLimit":true” so I experimented with the value for “resultRecordCount=1000” without success. When I removed the parameter completely the Query worked correctly. The Query result contained a single feature.
Problem2: The Query returns the correct result but it is not added to the IdentifyLayerResult for some reason. There were two items in the result. One had the error message “The item to be created already exists in the database.” and did not have a corresponding Query, it was some random layer. The second result had the error “Error performing query operation” which I was able to match up with one of the REST Queries. I was not able to debug this any further.
Problem 3: The application will suddenly stop with exit code 3 when calling the IdentifyLayerAsync method. Never on the first call, usually on the second try after having one of the above failures the first time.
Details of the REST Queries can be found in the attached Word document.
Hello Stephen,
I work for UPS and we just noticed that issue as well after we upgraded our app to 100.2.1. We call the IdentifyLayerAsync on the mousemove to detect the street. But we also add the Cancellation token so that we can cancel the call if the mouse is moved. If we take out the token then it takes about a minute to finish the IdentifyLayerAsync call but the app does not crash. But if we add that cancellation token, it does cancel the call but then it crashes the app soon after. Were you able to find a work around for the problem or did esri ever get back to you regarding this issue?
Thanks,
Hemanjan
No one from ESRI ever showed any interest in fixing the problem. I didn't like their redesign using the Query endpoint anyway. I ended up going directly to the REST Identify endpoint instead. It took a couple of days but I am happy with the results. I was able to leverage that same code to hit the FIND endpoint which is missing from the RT API. All in all time well spent.