Select to view content in your preferred language

How to get extent from server for ArcGISDynamicMapServiceLayer or Feature Layer after setLayerDefinitions

1388
5
Jump to solution
11-16-2016 07:15 PM
PitersonPaulgek
Deactivated User

Hi,

We apply setLayerDefinitions() to layer and want to get extent of filtered features.

The way we do it - use Query and return geometries and get extent.

It works good until big number of result. Let say the result is one million features.

So, the question is if we can get somehow the extent of filtered features from the server, or other way?

Or ArcGISDynamicMapServiceLayer or FeatureLayer.

0 Kudos
1 Solution

Accepted Solutions
RobertScheitlin__GISP
MVP Emeritus

Piterson,

   Sure you can use the QueryTask executeForExtent this will return a count and an extent of the features that meet the query criteria.

View solution in original post

0 Kudos
5 Replies
RobertScheitlin__GISP
MVP Emeritus

Piterson,

   Sure you can use the QueryTask executeForExtent this will return a count and an extent of the features that meet the query criteria.

0 Kudos
PitersonPaulgek
Deactivated User

Robert,

Thank you for response. 

It says "Valid only for hosted features services on arcgis.com"

We have no such services.

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

and for ArcGIS Server 10.3.1 and later.

0 Kudos
PitersonPaulgek
Deactivated User

We do not use hosted feature servises

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Piterson,

   If you have ArcGIS Server 10.3,1 or greater then you CAN.

Valid only for hosted features services on arcgis.com and for ArcGIS Server 10.3.1 and later

0 Kudos