ESRI.ArcGIS.ADF.Web.UI.WebControls
GetFunctionalities Method
See Also  Example
ESRI.ArcGIS.ADF.Web.UI.WebControls Namespace > Map Class : GetFunctionalities Method




Retrieves the map functionalities associated with the Map and its resources.

Syntax

Visual Basic (Declaration) 
Public Function GetFunctionalities() As IEnumerable
Visual Basic (Usage)Copy Code
Dim instance As Map
Dim value As IEnumerable
 
value = instance.GetFunctionalities()
C# 
public IEnumerable GetFunctionalities()

Return Value

This method returns the IMapFunctionality
A collection of map functionalities associated with the Map and its resources.

Example

This example sets all map functionalities (services) in the map to invisible, except for the first one.
C#Copy Code
foreach (IMapFunctionality mapFunct in Map1.GetFunctionalities()) 



    mapFunct.DisplaySettings.Visible = false; 



Map1.GetFunctionality(0).DisplaySettings.Visible = true; 

    
Visual BasicCopy Code
Dim mapFunct As IMapFunctionality

For Each mapFunct In Map1.GetFunctionalities()

    mapFunct.DisplaySettings.Visible = False

Next

Map1.GetFunctionality(0).DisplaySettings.Visible = True

Remarks

This method returns a collection of IMapFunctionality objects that may be used to work with the map. The Map control creates these functionality objects from the resources (services) that were added to the MapResourceManager associated with the Map.

The number of map functionalities will be the same as the number of map resources (services) added to the MapResourceManager buddied to the Map. Each map functionality is an instance of a specific class that implements IMapFunctionality. For example, if an ArcGIS Server service is added to the MapResourceManager, then the corresponding map functionality will be a MapFunctionality object in the ESRI.ArcGIS.ADF.Web.DataSources.ArcGISServer assembly.

The Map control will initialize the functionalities when GetFunctionalities() is called. Since initialization involves requesting information from the GIS server for the resource, you should call this method only when you need to obtain the entire functionality collection. If you need only one map functionality, call one of the GetFunctionality() methods instead.

If you create other types of functionalities, they will not appear in the GetFunctionalities() collection. For example, if you call MapResourceInternet.CreateFunctionality() and create a query functionality (IQueryFunctionality), this functionality object will not be included in the collection of functionalities returned by a subsequent call to GetFunctionalities().

See Also

© 2010 All Rights Reserved.