Select to view content in your preferred language

Query extent without returned geometries

611
3
07-29-2010 05:39 AM
Ganael_Jatteau
Emerging Contributor
Hi,

I need to get the extent of a layer with a where clause.

Right now, I use a QueryTask with returnGeometries=true, then I get the extent of all the graphics. Do you think there is a solution to do the same thing without downloading all the geometries to the client ?

Thanks!
Tags (2)
0 Kudos
3 Replies
EokNgo
by
Deactivated User
Hi,

I need to get the extent of a layer with a where clause.

Right now, I use a QueryTask with returnGeometries=true, then I get the extent of all the graphics. Do you think there is a solution to do the same thing without downloading all the geometries to the client ?

Thanks!


Are you performing a necessary query to get a subset? If not...
You can get the extent of a layer itself using the GetDetails() method on the ArcGISDynamicLayer.
http://help.arcgis.com/en/webapi/flex/apiref/com/esri/ags/layers/ArcGISDynamicMapServiceLayer.html#g...
0 Kudos
Ganael_Jatteau
Emerging Contributor
Yes the problem is that I specify a where clause to get a subset of my layer.

Ideally, it would be nice to have the extent stored in the result when we query with "returnGeometry=false".
0 Kudos
Ganael_Jatteau
Emerging Contributor
A workaround is to set maxAllowableOffset with a high value. The returned geometries look like triangles but the query executes much faster. Then a GraphicUtil.getExtent() will do the job.
0 Kudos