Select to view content in your preferred language

IdentifyTask removed in version 4.1. Which alternative(s)?

3994
18
10-08-2016 10:43 AM
WillemLigtendag
Deactivated User

I have a MapImageLayer on which I was using an IdentifyTask‌ in version 4.0. Unfortunately that task is removed from version 4.1. I don't know why. It isn't mentioned in the documentation. Supposedly the QueryTask can be used instead. I need to get out the values from one single sublayer, so that would be a valid alternative for me. But I can't get the QueryTask to work on the MapImageLayer. Does anyone know if that can be done and if so, which parameters to use? I keep getting the message "Invalid or missing input parameter".

Tags (1)
18 Replies
JuliePowell
Esri Contributor

We already spoke on the phone, but just in case others are following this thread - We are working towards having WMS support in 4.3. I will post an update closer to the release to confirm whether it will likely make it. 

0 Kudos
janjermei
Occasional Contributor

Thanks, what is really important for us is the fact that the IdentifyTask let us work with pixels to set the sensitivity of the selection.

Will it be possible in the future to define a geometric query that does not use real world distances?

JuliePowell
Esri Contributor

Yes, we will add the ability to query a layer based on pixels (using a defined tolerance); the dev team is currently working on the design for this.

0 Kudos
JuliePowell
Esri Contributor

All, thank you for your feedback. IdentityTask is actually still part of the 4.1 API, but was removed from the online documentation because we had planned on introducing a new (elegant) implementation that would better integrate with the 4.x API design, and could also support 3D in the future. However, in hindsight, we should have left it in the documentation since it was already available with 4.0. We added a task in our queue to put it back; I will update this thread once it is available in the online SDK. In the meantime, here is a sample showing how you can use IdentityTask with the 4.1 API:

IdentityTask Sample - jsbin 

WillemLigtendag
Deactivated User

Julie,

That may be the case, but could you please put it back into the type definitions for TypeScript as well? I assumed the the IdentifyTask had gone when I got a TypeScript build error and looked at the 4.1 documentation.

0 Kudos
JuliePowell
Esri Contributor

Yes, we will recreate the TypeScript definitions along with the SDK update. I should have more info on timing by mid-next week.

WillemLigtendag
Deactivated User

Thanks a lot! I realize I've created a lot of action with my question. But please allow me to state here that I'm perfectly OK with the course you are taking. You're trying to make the API simpler and more intuitive and that takes time. Please throw the stuff at us as soon as you think it's more or less workable. We'll adapt (at least most of us, I assume). Better than getting everything at the last possible moment.

JuliePowell
Esri Contributor

Your questions are valid and you've helped us with an oversight. Please keep the feedback and questions coming!

0 Kudos
JuliePowell
Esri Contributor

The SDK is now updated with IdentityTask and FindTask. We also just published the TypeScript definition files with both of these added back in:  https://github.com/Esri/jsapi-resources/commit/2978250

0 Kudos