ESRI.ArcGIS.ADF.Web.DataSources
IQueryFunctionality Interface
Members  Example  See Also 
ESRI.ArcGIS.ADF.Web.DataSources Namespace : IQueryFunctionality Interface




Enables access to querying functionality on a GIS resource.

Syntax

Visual Basic (Declaration) 
Public Interface IQueryFunctionality 
   Inherits IGISFunctionality 
Visual Basic (Usage)Copy Code
Dim instance As IQueryFunctionality
C# 
public interface IQueryFunctionality : IGISFunctionality  

Example

This example demonstrates how to obtain a query functionality from the Map control named Map1 on a Page.
C#Copy Code
ESRI.ArcGIS.ADF.Web.DataSources.IMapFunctionality mapFunct = Map1.GetFunctionality(0); 

ESRI.ArcGIS.ADF.Web.DataSources.IGISResource gisResource = mapFunct.Resource; 

  

bool querySupported = gisResource.SupportsFunctionality( 

    typeof(ESRI.ArcGIS.ADF.Web.DataSources.IQueryFunctionality)); 

  

if (querySupported) 



    ESRI.ArcGIS.ADF.Web.DataSources.IQueryFunctionality queryFunct = 

        (ESRI.ArcGIS.ADF.Web.DataSources.IQueryFunctionality)gisResource.CreateFunctionality( 

        typeof(ESRI.ArcGIS.ADF.Web.DataSources.IQueryFunctionality), null); 

  

    // now a query can be performed with the query functionality 



    
Visual BasicCopy Code
Dim mapFunct As ESRI.ArcGIS.ADF.Web.DataSources.IMapFunctionality = Map1.GetFunctionality(0)

Dim gisResource As ESRI.ArcGIS.ADF.Web.DataSources.IGISResource = mapFunct.Resource



Dim querySupported As Boolean = gisResource.SupportsFunctionality( _

    Type.GetType(ESRI.ArcGIS.ADF.Web.DataSources.IQueryFunctionality))



If querySupported Then



    Dim queryFunct As ESRI.ArcGIS.ADF.Web.DataSources.IQueryFunctionality = _

        CType(gisResource.CreateFunctionality(

        Typeof(ESRI.ArcGIS.ADF.Web.DataSources.IQueryFunctionality), null), _

        ESRI.ArcGIS.ADF.Web.DataSources.IQueryFunctionality)



    ' now a query can be performed with the query functionality

End If

Remarks

IQueryFunctionality is used to query a GIS resource to find features in map layers that satisfy specific search criteria. These criteria may include attribute filters (where expression) and geometry filters (e.g., find features that intersect the input rectangle extent).

Typically the instance of a class that implements IQueryFunctionality is obtained by working with the Map control or MapResourceManager control on the Page. The Map.GetFunctionality() or Map.GetFunctionalities() will provide the default functionality (a MapFunctionality), from which you can obtain the Resource. Then from the resource you can obtain a query functionality object. See the example for an illustration.

Query functionality may be used without knowing the specific type of service (ArcGIS Server, ArcIMS, WMS, etc.) that implements the query ability. This enables writing generic code that will work with any type of service.

These classes implement IQueryFunctionality:

For more discussion of GIS resources and functionalities, see the topic Working with the Common Data Source API in the Developer Help (also available online at the ArcGIS Resource Center).

See Also

© 2010 All Rights Reserved.