Hi, I have a MapImageLayer with a bunch of sublayers and want to perform spatial queries to get polygons that intersects among every two sublayers. How to get the extent of a sublayer to set a geometry of the query?
Daniela,
You have to use a Query and queryTask on the sublayer url. Use QueryTask.executeForExtent:
https://developers.arcgis.com/javascript/3/jsapi/querytask-amd.html#executeforextent
I'm using ArcGIS JS API 4.10
There is the function I'm using by:
It is a spatial request of a sublayer against another sublayer, but I don't know how to take the extent of the sublayer which I do request againts
Daniela,
Use the subLayer.url property to do a QueryTask and then use the QueryTask.executeForExtent method.