Select to view content in your preferred language

"QueryTask" at 100.x

2524
13
Jump to solution
08-15-2017 03:36 PM
MarkCederholm
Frequent Contributor

Is there anything like the QueryTask/FindTask/IdentifyTask classes at 100.x?  Or in the works?  I can create a ServiceFeatureTable just fine from a map image service and query that, but there are times when the 10.2.x  classes come in real handy.

Tags (2)
0 Kudos
1 Solution

Accepted Solutions
dotMorten_esri
Esri Notable Contributor

There is no FindTask at the moment.

IdentifyTask has been replaced with the Identify methods directly on the GeoView should should make creating idenfy across many layers much much easier.

QueryTask has been replaced with query against a ServiceFeatureTable.

View solution in original post

0 Kudos
13 Replies
MarkCederholm
Frequent Contributor

Also, is there a way to retrieve something like a ArcGISMapImageSublayer info for tables in a map image service?  IdInfos don't cut the mustard, and hydrating a ServiceFeatureTable is a serious performance hit.  I really hate the thought of wrapping the REST API in my own classes when 10.2.x does it so conveniently.

0 Kudos
MarkCederholm
Frequent Contributor
          private static ArcGISMapServiceSublayerInfo GetInfoFromUrl(string sServiceUrl, long iSubLayerID)
          {

               // Create sublayer info from JSON

               string sLayerUrl = sServiceUrl + "/" + iSubLayerID.ToString();
               string sRequest = sLayerUrl + "?f=json";
               HttpWebRequest r = (HttpWebRequest)WebRequest.Create(sRequest);
               r.UseDefaultCredentials = true;
               r.PreAuthenticate = true;
               r.Credentials = CredentialCache.DefaultCredentials;
               HttpWebResponse result = (HttpWebResponse) r.GetResponse();
               string sJSON;
               using (StreamReader sr = new StreamReader(result.GetResponseStream()))
               {
                    sJSON = sr.ReadToEnd();
               }
               ArcGISMapServiceSublayerInfo info = ArcGISMapServiceSublayerInfo.FromJson(sJSON);
               return info;

          }
0 Kudos
MarkCederholm
Frequent Contributor

Thank goodness for JavaScriptSerializer!  Life is easier now.

0 Kudos
JoeHershman
MVP Regular Contributor

Why not json.net?

Thanks,
-Joe
0 Kudos
MarkCederholm
Frequent Contributor

No real reason -- it's a good library.  I just don't like the dependency.  Same reason I avoid MVVM Light and stick to System.Windows.Interactivity.

0 Kudos
dotMorten_esri
Esri Notable Contributor

There is no FindTask at the moment.

IdentifyTask has been replaced with the Identify methods directly on the GeoView should should make creating idenfy across many layers much much easier.

QueryTask has been replaced with query against a ServiceFeatureTable.

0 Kudos
MarkCederholm
Frequent Contributor

Thanks for the info.  Are ServiceFeatureTables limited by maxRecordCount, or do they work around it by querying IDs first?  Also, a unique values method would be very useful.

0 Kudos
dotMorten_esri
Esri Notable Contributor

They are currently limited by maxRecordCount. Paging and Statistics Queries are scheduled to be coming in the next update.

You can get around maxRecordCount by repeating the query and add "WHERE ObjectID > [HighestOIDSoFar"

0 Kudos
MarkCederholm
Frequent Contributor

The GeoView identify methods are a good start, but limited in that they only allow a screen point and tolerance.  Ideally, general geometry types should be supported.

0 Kudos