Feature service Query method

Queries and returns the features or objects that satisfy the query criteria.

ServiceData Query(int LayerOrTableID, string DefinitionExpression, QueryFilter QueryFilter, ServiceDataOptions ServiceDataOptions, string VersionName, double MaximumAllowableOffset)

Parameter

Description

LayerOrTableID

The identifier for the layer or table.

DefinitionExpression

The definition expression.

QueryFilter

Describes the features or objects to query based on attribute expressions, time and/or spatial filters.

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

This method returns an object of ServiceData type.

Remarks

The returned object has features or objects in the user specified formats, such as "AMF", "JSON" and "Native".

11/8/2016