What is the equivalent of QueryTask in v100.1?

790
5
08-02-2017 06:53 AM
FrancisGagne
New Contributor

I'm trying to identify the features in a ArcGISMapImageServiceLayer.

In 10.2.8 I was using QueryTask to query services, but it's been removed in 100 and I cannot seem to find the equivalent. There's no sample code either.

Thanks,

0 Kudos
5 Replies
AlexanderNohe1
Occasional Contributor III

There is a guide here on how to identify layers:

Identify features—ArcGIS Runtime SDK for Android | ArcGIS for Developers 

Additionally, you can use GeoView.identidyLayerAsync Method to identify features:

https://developers.arcgis.com/android/latest/api-reference/reference/com/esri/arcgisruntime/mapping/..., android.graphics.Point, double, boolean, int)

The layer you are working with is a MapServer layer like : Wildfire (MapServer)  ?

Thanks,

Alexander

FrancisGagne
New Contributor

I'm using Energy/HSEC (MapServer)  for testing right now.

Am I bound to use only a Point with tolerance or can I use a Polygon for the selection?

And to execute a search on the image layer, what should I use?

0 Kudos
AlexanderNohe1
Occasional Contributor III

Selection or identify?


Selection can be accomplished by changing the touch listener and using the area created from the touch listener to select features in that area by using a query.

0 Kudos
FrancisGagne
New Contributor

Well, when I identify, I also want to select the features.

The on tap is good with the mapView.identifyLayersAsync as you mentioned.

The problem with the selection is what do I do with my polygon to send it to the service so I can select and identify everything in it?

I also want to search features in a certain image layer. How do I do that?

0 Kudos
AlexanderNohe1
Occasional Contributor III

The image layer is a tiled layer?

Did you create the tiled layer in ArcGIS Online from a feature service / map service?  How ArcGIS Online handles this is that it stores the map service behind the scenes and then queries that services instead.  We are aware that the runtime at this point does not match that capability, but we hope on getting it addressed in the near future.

0 Kudos