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.
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.
Let me start off by saying great job on the new runtime, love many of the design choices of the 100.x, buuuuutttt I do see many use cases for needing to query a service directly--there are some services that we like to query without having them added to the GeoView, the ServiceFeatureTable query features has gotten me pretty far with updating apps from the old WPF but now I am attempting to do the same yet with ImageServices... not seeing anything similiar to queryfeatures from ServiceFeatureTable/ArcGISFeatureTable on the ImageServiceRaster or base Raster. -am I missing something? Is this up and coming ? Do I need to implement my own, noticing ImageSeviceRaster and Raster are sealed.
Not true! The REST Map service identify operation works with a general geometry. And it's a much more efficient operation than querying individual sublayers.
http://resources.arcgis.com/en/help/arcgis-rest-api/index.html#/Identify_Map_Service/02r300000113000000/
also:
https://developers.arcgis.com/net/10-2/desktop/api-reference//html/T_Esri_ArcGISRuntime_Tasks_Query_IdentifyParameters.htm
I think what you are asking for then is spatial queries. That's a very different operation than identify.
Identify runs at the pixel level and intersects the _symbol_ being rendered, not the geometry (although there are some exceptions for services not supporting that). The old identify task was actually no different, as the ArcGIS Server Rest Endpoint works the exact same way in pixel-coordinate space.
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.
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"
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.
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.
Why not json.net?
Thank goodness for JavaScriptSerializer! Life is easier now.
<SPAN class="keyword token">private</SPAN> <SPAN class="keyword token">static</SPAN> ArcGISMapServiceSublayerInfo <SPAN class="token function">GetInfoFromUrl</SPAN><SPAN class="punctuation token">(</SPAN><SPAN class="keyword token">string</SPAN> sServiceUrl<SPAN class="punctuation token">,</SPAN> <SPAN class="keyword token">long</SPAN> iSubLayerID<SPAN class="punctuation token">)</SPAN> <SPAN class="punctuation token">{</SPAN> <SPAN class="comment token">// Create sublayer info from JSON</SPAN> <SPAN class="keyword token">string</SPAN> sLayerUrl <SPAN class="operator token">=</SPAN> sServiceUrl <SPAN class="operator token">+</SPAN> <SPAN class="string token">"/"</SPAN> <SPAN class="operator token">+</SPAN> iSubLayerID<SPAN class="punctuation token">.</SPAN><SPAN class="token function">ToString</SPAN><SPAN class="punctuation token">(</SPAN><SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">;</SPAN> <SPAN class="keyword token">string</SPAN> sRequest <SPAN class="operator token">=</SPAN> sLayerUrl <SPAN class="operator token">+</SPAN> <SPAN class="string token">"?f=json"</SPAN><SPAN class="punctuation token">;</SPAN> HttpWebRequest r <SPAN class="operator token">=</SPAN> <SPAN class="punctuation token">(</SPAN>HttpWebRequest<SPAN class="punctuation token">)</SPAN>WebRequest<SPAN class="punctuation token">.</SPAN><SPAN class="token function">Create</SPAN><SPAN class="punctuation token">(</SPAN>sRequest<SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">;</SPAN> r<SPAN class="punctuation token">.</SPAN>UseDefaultCredentials <SPAN class="operator token">=</SPAN> <SPAN class="keyword token">true</SPAN><SPAN class="punctuation token">;</SPAN> r<SPAN class="punctuation token">.</SPAN>PreAuthenticate <SPAN class="operator token">=</SPAN> <SPAN class="keyword token">true</SPAN><SPAN class="punctuation token">;</SPAN> r<SPAN class="punctuation token">.</SPAN>Credentials <SPAN class="operator token">=</SPAN> CredentialCache<SPAN class="punctuation token">.</SPAN>DefaultCredentials<SPAN class="punctuation token">;</SPAN> HttpWebResponse result <SPAN class="operator token">=</SPAN> <SPAN class="punctuation token">(</SPAN>HttpWebResponse<SPAN class="punctuation token">)</SPAN> r<SPAN class="punctuation token">.</SPAN><SPAN class="token function">GetResponse</SPAN><SPAN class="punctuation token">(</SPAN><SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">;</SPAN> <SPAN class="keyword token">string</SPAN> sJSON<SPAN class="punctuation token">;</SPAN> <SPAN class="keyword token">using</SPAN> <SPAN class="punctuation token">(</SPAN>StreamReader sr <SPAN class="operator token">=</SPAN> <SPAN class="keyword token">new</SPAN> <SPAN class="token class-name">StreamReader</SPAN><SPAN class="punctuation token">(</SPAN>result<SPAN class="punctuation token">.</SPAN><SPAN class="token function">GetResponseStream</SPAN><SPAN class="punctuation token">(</SPAN><SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">)</SPAN> <SPAN class="punctuation token">{</SPAN> sJSON <SPAN class="operator token">=</SPAN> sr<SPAN class="punctuation token">.</SPAN><SPAN class="token function">ReadToEnd</SPAN><SPAN class="punctuation token">(</SPAN><SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">;</SPAN> <SPAN class="punctuation token">}</SPAN> ArcGISMapServiceSublayerInfo info <SPAN class="operator token">=</SPAN> ArcGISMapServiceSublayerInfo<SPAN class="punctuation token">.</SPAN><SPAN class="token function">FromJson</SPAN><SPAN class="punctuation token">(</SPAN>sJSON<SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">;</SPAN> <SPAN class="keyword token">return</SPAN> info<SPAN class="punctuation token">;</SPAN> <SPAN class="punctuation token">}</SPAN> <SPAN class="line-numbers-rows"><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN></SPAN>
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.
Aangemelde leden kunnen berichten plaatsen, updates volgen en meer. Nieuw hier? Registreer een gratis account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.