Feature service QueryFromService method

Queries and returns the features/objects for queries involving one or more layers and tables.

ServiceData QueryFromService(GFSTableDescription[] LayerOrTableDescriptions, Geometry Geometry, SpatialReference outSR, TimeReference outTR, ServiceDataOptions ServiceDataOptions, string VersionName, double MaximumAllowableOffset)

Parameter

Description

LayerOrTableDescriptions

Describes the tables or layers and/or types of interest in the service.

Geometry

Defines the extent for which features are being queried.

OutSR

The spatial reference in which to return the results.

OutTR

The time reference in which to return the results.

ServiceDataOptions

Specifies the format and transport types.

VersionName

Geodatabase version to query. This parameter applies only to feature services that expose geodatabases. If not specified, queries are made against the published map's version.

MaximumAllowableOffset

Specifies the maximum allowable offset to be used for generalizing geometries returned by the query operation. The MaximumAllowableOffset is in the units of the OutputSpatialReference as defined in the QueryFilter. If the OutputSpatialReference is not specified, then MaximumAllowableOffset is assumed to be in the unit of the spatial reference of the map.

Return Value

QueryFromService returns an object of ServiceData type, which has an array of DataObjectGroup elements.

Remarks

The OutSR and OutTR parameters are optional. If you do not need to set the spatial reference or the time reference set the parameters to null.

2/28/2020