ESRI.ArcGIS.ADF.IMS
QueryParameters Class
Members  Example  See Also 
ESRI.ArcGIS.ADF.IMS.Carto.Layer Namespace : QueryParameters Class




Parameters used for Querying on a FeatureLayer.

Object Model




Syntax

Visual Basic (Declaration) 
<SerializableAttribute()>
Public Class QueryParameters 
Visual Basic (Usage)Copy Code
Dim instance As QueryParameters
C# 
[SerializableAttribute()]
public class QueryParameters 

Example

For an example of using QueryParameters to select features without buffering, see FeatureLayer.Query . For an example of using QueryParameters with buffering to a target layer, see SelectionBuffer.

The following example sets many of the properties for a new QueryParameters object.

C#Copy Code
ESRI.ArcGIS.ADF.IMS.Carto.Layer.Filter queryFilter = 

    new ESRI.ArcGIS.ADF.IMS.Carto.Layer.Filter("NAME = 'Mekong'"); 

  

ESRI.ArcGIS.ADF.IMS.Carto.Layer.QueryParameters qParams; 

qParams = new ESRI.ArcGIS.ADF.IMS.Carto.Layer.QueryParameters(queryFilter); 

  

qParams.EscapeResults = true; 

qParams.FeatureLimit = 100; 

qParams.OutputSpatialReference =  

    new ESRI.ArcGIS.ADF.IMS.SpatialReference.SpatialReference(26911); 

qParams.ReturnEnvelopes = false; 

qParams.ReturnGeometries = true; 

qParams.ReturnGlobalEnvelope = true; 

    
Visual BasicCopy Code
Dim queryFilter As New _

    ESRI.ArcGIS.ADF.IMS.Carto.Layer.Filter("NAME = 'Mekong'")



Dim qParams As New _

    ESRI.ArcGIS.ADF.IMS.Carto.Layer.QueryParameters(queryFilter)



qParams.EscapeResults = True

qParams.FeatureLimit = 100

qParams.OutputSpatialReference = _

    New ESRI.ArcGIS.ADF.IMS.SpatialReference.SpatialReference(26911)

qParams.ReturnEnvelopes = False

qParams.ReturnGeometries = True

qParams.ReturnGlobalEnvelope = True

Remarks

QueryParameters is used to find features in a feature layer by calling the Query method in the FeatureLayer. The query must include a valid QueryFilter, which specifies the attribute or spatial parameters of the query.

The query may also select features within a specified distance of another set of features in the same or different layer. For details, see SelectionBuffer.

Other properties of QueryParameters determine what information is returned with the query results: feature envelopes (ReturnEnvelopes), feature geometry (ReturnGeometries), and the envelope of all selected features (ReturnGlobalEnvelope). FeatureLimit limits the number of features returned in a given query operation. EscapeResults enables escaping of returned data. And OutputSpatialReference sets the projection and datum of the returned data.

Inheritance Hierarchy

System.Object
   ESRI.ArcGIS.ADF.IMS.Carto.Layer.QueryParameters

See Also

© 2010 All Rights Reserved.