I currently use ArcGISDynamicMapServiceLayer in a map with multiple layers of the same data symbolized differently based on scale. I use layerDefinitions to set all the definition queries as a user filters the map. The performance problem comes when trying to zoom to the selection with polygons since I have to use a queryTask, get the geometries back, and get the extent. This is done on data published from our own ArcGIS Servers.
It would be very nice to use the QueryTask.ExecuteForExtent method so I don't have to get back all the features and their geometries, but this is only available to hosted feature services at 3.9. Is there a technical challenge that makes it not possible to implement for non-hosted services?
Solved! Go to Solution.
I asked this question at UC and at the Esri DC open house. A developer at the later event wrote me an email afterwards stating that the functionality needed in ArcGIS Server to support this would be available in 10.3.1. I would assume the javascript api would be updated after that release to support ExecuteForExtent. Hope that helps!
Did you receive an answer to this question? I have the same problem.
I asked this question at UC and at the Esri DC open house. A developer at the later event wrote me an email afterwards stating that the functionality needed in ArcGIS Server to support this would be available in 10.3.1. I would assume the javascript api would be updated after that release to support ExecuteForExtent. Hope that helps!
This functionality is available in Server at 10.3.1 using parameter returnExtentOnly=true so hopefully it will make it into version 3.14 of the javascript api?
Michael Gayheart - the QueryTask.executeForExtent has been supported in the JavaScript API since version 3.9 (no need to wait for 3.14).
See What's new in Version 3.9 | Guide | ArcGIS API for JavaScript
The documentation states that it only works with hosted feature services though. Maybe the documentation is out of date now?
Correct, the JSAPI doc hasn't been updated since the release of 10.3.1.
The doc will be updated as part of the next release of the Javascript API.