Definition query layer - Actual extent

2532
3
11-06-2012 09:38 PM
ScottSugden
New Contributor III
How do I get the actual extent of a layer with a definition query? The MapLayerInfo.Extent property returns the extent of the entire layer and not just the extent of those features returned by the definition query. If a map service contains a layer defined by a definition query that layer will only ever return features that match the definition query. I need the extent of those features matching the definition query and not the extent of all the features in the layer. Thank you.
Tags (2)
0 Kudos
3 Replies
TanuHoque
Esri Regular Contributor
Scott,
Unfortunately this is not currently supported. If you are not using a FeatureLayer on your web client, only option you have is to query to get only geometries and post process to compute the extent. I understand this requires an additional call and post processing....

Thanks.
Tanu
0 Kudos
ScottSugden
New Contributor III
Tanu, Yes I thought of that option, but that is not really viable as I have a number of such layers and each layer definition query can contain many features, so performance would be an issue. I suppose what ArcGIS Server needs is an API to query the shape (or geometry) column. Do you know of any such plans? Thank you for the response.
MichaelGayheart1
New Contributor III

I am running into this performance problem also and would appreciate a queryForExtent method on the REST api for Dynamic Map Service Layers. I have some fairly large polygons and even when I use MaxAllowableOffset at a very high number, I still get back a lot more features filled with vertices than if I could just get an extent returned. Any chance of being in 10.3?

Would a geoprocessing service that took a layer and query and returned an extent be faster (I assume it would be less bandwidth) than returning the features to the client and having to post-process them to get an extent?

0 Kudos