ArcObjects Library Reference (Carto)  

MapServerLayer CoClass

Provides programmatic access to a map server layer.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Interfaces

Interfaces Description
ICompositeLayer Provides access to members that work with a collection of layers that behaves like a single layer.
ICompositeLayer2 Provides access to members that control whether a layer is expanded in the TOC.
IConnectionPointContainer Supports connection points for connectable objects.
IDataLayer Provides access to members that control the data source properties of a layer.
IDisplayAdmin (esriDisplay) Provides access to members that control display administration.
IDisplayAdmin2 (esriDisplay) Provides access to members that control display administration.
IGeoDataset (esriGeoDatabase) Provides access to members that provide information about a Geographic Dataset.
IHTMLPopupIdentify Provides access to members that consume the HTML popup tool content.
IHTMLPopupIdentify2 Provides access to members that consume the HTML popup tool content.
IHTMLPopupInfo Provides access to members that control the HTML popup tool.
IHTMLPopupInfo2 Provides access to members that control the HTML popup tool.
IIdentify Provides access to members that identify features.
IIdentify2 Provides access to members that set the current scale of the display.
IIdentifyDisplay Provides access to members that will identify based on display.
IIdentifyGroup Indicator interface identifying a layer as a top-level group for identify.
ILayer Provides access to members that work with all layers.
ILayerDrawingProperties Provides access to members that control layer drawing properties.
ILayerEffects Provides access to members that control layer effects.
ILayerExtensions Provides access to the extensions of a layer.
ILayerGeneralProperties Provides access to layer general properties.
ILayerInfo Provides access to members that return layer images.
ILayerPosition Provides access to members that control a layer's default position in the map interface.
ILayerStatus Provides access to feedback on the status of a layer's time-consuming actions.
ILayerSymbologyExtents Provides access to layer extents based on the symbology.
IMapServerGroupLayer Provides access to map server sublayers.
IMapServerLayer Provides access to the available properties of a map server layer object.
IPersistStream (esriSystem)
IPublishLayer Provides access to a layer's capability for being published with the ArcGIS Publisher extension.
IRasterResamplingControl (esriDataSourcesRaster) Provides access to members that provides raster resampling control.
ISecureLayer Provides functionality to control access to a layer's contents.
ISecureLayer2 Provides access to control and test a layer's content related to authentication.
IServiceLayerImageFormat Provides access to members that control the image format set of service layers.
ITimeData Provides access to time related properties of a layer.
ITimeData2 Provides access to time related properties of a layer.
ITimeDataDisplay Provides access to time animation related properties of a layer.

Event Interfaces

Interfaces Description
ILayerEvents (default) Provides access to events that occur when layer visibility changes.

Remarks

The MapServerLayer coclass allows users to display and query the contents of a data frame in a map document published through an ArcGIS Map Service, or directly from the map file.
A few notes concerning interfaces that MapServerLayer implements.  The count on ICompositeLayer or ICompositeLayer2 may not match the actual number of sub layers represented in the Map Server Layer (see Count on ILayerDescriptions). This is because the count on ICompositeLayer or ICompositeLayer2 does not include members of composite layers that are embedded within the MapServerLayer. The count on ICompositeLayer or ICompositeLayer2 only counts the parent layer.


The values for the IGeoDataset properties Extent and SpatialReference will reflect the map units and spatial reference set in the data frame of the original map document that is bound to the Map Server object.  These may not reflect the spatial reference of the layer's underlying data.

The following are not supported: LoadLayers on ILayerFactory, Brightness and Contrast on ILayerEffect and ShowTips and TipText on ILayer.

Working with Events

[Visual Basic 6.0]

When working with MapServerLayer's default outbound interface in Visual Basic 6 declare variables as follows:

Private WithEvents pMapServerLayer as MapServerLayer