Create geometry that covers entire layerview extent

333
1
11-13-2022 05:33 PM
AnAlien
New Contributor

Hi guys, 

 

I'm trying to query the user's viewable extent on the layerview.

So I want to query all features available on the layerview. 

For that, I need to create a geometry but how do I set a rectangle that covers the entire extent? 

0 Kudos
1 Reply
Sage_Wall
Esri Contributor

Hi @AnAlien,

Is there a reason why a non-spatial query wouldn't work?  If you used the queryFeatures method without query parameters all the current features in the LayerView will be returned.  If a spatial query is truly needed, you could use the queryExtent method to obtain the extent for the current features in the LayerView, but then you would need to do another query based on that extent to return the features.