This document is archived and information here might be outdated.  Recommended version.


Carto (ArcObjects .NET 10.5 SDK)

Carto


Supported with:
  • Engine
  • ArcGIS for Desktop Basic
  • ArcGIS for Desktop Standard
  • ArcGIS for Desktop Advanced
  • Server
Library dependencies: Version, System, SystemUI, Geometry, GraphicsCore, Display, Server, Output, Geodatabase, GISClient, DataSourcesFile, DataSourcesGDB, DataSourcesOleDB, DataSourcesRaster, DataSourcesNetCDF, GeoDatabaseDistributed, GeoDatabaseExtensions

Additional library information: Contents, Object Model Diagram

This topic provides an overview of the most commonly used interfaces and classes in the Carto library. For more information on programming with the Carto library, see the Mapping and Visualization section of Working with ArcGIS Components, specifically, Working with map documents, Working with the map, and Working with the page layout.
Additionally, you can find conceptual topics, how-to topics, samples, walkthroughs, and snippets for cartography, mapping, and visualization by navigating to the Query for topics about topic and selecting Cartography, Mapping, or 2D display in the Find topics about drop-down menu.

See the following sections for more information about this namespace:

Creating and displaying maps

The Carto library supports the creation and display of maps. ArcMap displays maps in two views: the data view and the layout view. The data view shows data from a given map, whereas the layout view can display multiple maps and associated marginalia. The Carto library is extended in a number of areas. Custom renderers and layers are common. A custom layer is often the easiest method of adding custom data support to a mapping application.
IMxDocument and IMapDocument are starting points for accessing most of the ArcMap objects including the views, the collection of maps, the page layout, the style gallery, and the table properties. These interfaces also manage many properties reflected in the running application, including the current table of contents, the currently selected item in the table of contents, and the current mouse pointer location.
IMxDocument is only available in ArcGIS for Desktop. It is a full-fledged ArcMap document that is tightly integrated with the ArcMap application. As such, a new ArcMap.exe process is produced each time IMxDocument is cocreated. It is commonly used by developers to extend desktop functionality or to manipulate desktop-specific features such as extension properties, page layout printer information, or user interface (UI)-specific functionality.
The IMapDocument interface can be used for ArcGIS Engine, Server, or Desktop development. It provides low-level access to map documents and layers. The IMapDocument interface provides no access to extension properties or UI-specific functionality.

For further information see:

How to access maps and layers via the MxDocument
How to access maps and layers via the MapDocument

Map and page layout

The Map object is the primary object used for the display and organization of geographic data in ArcGIS, while the PageLayout object is a virtual page upon which geographic data and map elements are placed and arranged. You can use the Map object to access the map in the data view and the data it contains, and the PageLayout object to manage the map in the layout view and the map surrounds. Although you can use the Map or PageLayout object directly in your applications, it is more common to use a higher level object such as MapControl or PageLayoutControl, or the ArcGIS for Desktop applications. These higher level objects simplify some tasks, although they also provide access to the lower-level Map and PageLayout objects, allowing you control of those objects as well.
The Map object is a primary point for customization tasks because it not only manages layers of data, but it is also a view and has to manage the drawing of its data. Typical tasks with the Map object include adding a new layer, panning the display, changing the view extent (zooming functions), changing the spatial reference, and obtaining the currently selected features and elements.
The Map object is a container of layers. The Map object has properties that operate on all layers within the map, such as spatial reference, map scale, and so on, along with methods that manipulate the map's layers. Layers can, if required, handle drawing operations for their associated data, but it is more common for layers to have an associated renderer object. The properties of the renderer object control how the data is displayed in the map. Renderers commonly use symbols from the Display library for the actual drawing—the renderer matches a particular symbol with the properties of the entity that is to be drawn.
A Map and a PageLayout can contain elements. An element contains geometry to define its location on the map or page, along with behaviors that control the display of the element. There are elements for basic shapes, text labels, complex marginalia, and so on. The Carto library also contains support for map annotation and dynamic labeling.
The PageLayout object is a container for hosting one or more maps and their associated marginalia, such as North arrows, legends, and scale bars.
The PageLayout object and its associated objects are shown in the following diagram:
The PageLayout object includes the SnapGrid, RulerSettings, SnapGuides, Page, and GraphicSnap objects.
SnapGrid, SnapGuides, and RulerSettings
The layout view supports a snap grid, which is a grid of reference points on the layout that is used to position elements. The grid can be used as a visual indicator of size and position, as well as used to snap elements into position.
You can use rulers, guides, and grids in layout view to align elements on the page. Rulers show the size of a page as well as the elements on the final printed map.
GraphicSnap coclasses
GridSnap moves graphics to the snap grid. GuideSnap moves graphics to the horizontal and vertical guides. MarginSnap snaps graphics to the layout's printable bounds. RulerSnap snaps graphics to the rulers.
The IGraphicSnap interface is used to tie the snap agents to the PageLayout object. If this property is not set, the graphic snap agents will not work properly. Because IPageLayoutSnap inherits from IGraphicSnap, all the methods on IGraphicSnap are directly available on IPageLayoutSnap.

For further information see:

Working with the map
Working with the page layout
Performing basic map functions
Working with PageLayout elements
Performing map selection
How to create AOIs and bookmarks
Brushing to create a selection
How to wire custom events using IActiveViewEvents

Map elements

Elements are used in the map or the page layout to display basic shapes, text labels, and so on. In page layout, they also display marginalia. Elements are useful to display on or around the map information that is not directly conveyed by the geographic features.
The map element objects are shown in the following diagram:
A map layout and a data frame can both contain elements, but elements are most commonly manipulated as part of a map layout. Elements can be thought of as the non feature-based components of a map. The list of supported elements includes FrameElement, which holds maps; MapSurroundFrame, which holds North arrows, the scale bar, and so on; and GraphicElements, which hold text, line, point, fillshape, and picture elements.
Elements are commonly accessed through the IGraphicsContainer interface implemented by the Map and PageLayout objects. Through this interface, you can add, delete, update, and retrieve individual elements in a Map or PageLayout. Use the GroupElement object to combine multiple elements into a single unit for manipulation by the user.
Graphic elements
Descending from the Element abstract class, graphic element objects are elements that work in both a data frame and a map layout. This category of elements includes text, lines, points, polygons, and pictures.
Frame elements
The frame element types include FrameElement (holds point, line, and polygon graphics), OleFrame (holds Object Linking and Embedding [OLE] objects such as Word documents), MapFrame (holds maps), and MapSurroundFrame (holds North arrows, the scale bar, legends, and other map primitives).
Frame elements contain other map elements—they serve as the background and border to these elements. The MapFrame element holds a map and allows access to that map along with the background and border properties of the container holding that map within the layout.
Map frames
Map frame objects are unique among frames and elements because they support events (map surround frames also support events) and reference grids. The MapFrameResized event is supported through IMapFrameEvents to allow the updating of map grids (graticules) when the frame is resized. Map grids are only supported through the MapFrame, not on the map itself.

For further information see:

Creating custom elements
Creating different kinds of custom elements
Working with map elements
Working with PageLayout elements

Map surrounds

Map surrounds are specific types of elements that are associated with a Map object. An example of a map surround and its capabilities is the North arrow. North arrows are built as map surrounds so that they can respond to map rotation—when a map is rotated, its North arrow is rotated the same amount.
In ArcMap, map surrounds are always contained by a MapSurroundFrame object—a type of element. MapSurroundFrames are similar to MapFrames, which house a Map object, in that the PageLayout object manages both of them. In fact, the PageLayout manages all frame objects. Each MapSurroundFrame is also related to a MapFrame; if a MapFrame is deleted, its MapSurroundFrames are deleted as well. Map surrounds are placed on the layout, not in a map’s graphics layer.
Map surrounds can be moved anywhere on the layout, not just within the confines of a map frame. Because map surrounds are directly associated with a Map, the Map has a shortcut to all the map surrounds associated with it (IMap.MapSurround). This member, along with IMap.MapSurroundCount, allow you to loop through the available map surrounds for a given Map object.
All map surrounds implement the IMapSurround interface. This interface provides the common functionality between all map surrounds. Use this interface to access the name of a particular map surround and the associated map. This interface also has methods for determining the size of a surround, as well as the ability to change that size.
Legends
The Legend coclass is a complex map surround object because it relies on several other objects, such as a legend item object, to create a legend.
The Legend object’s primary interface is ILegend. Use this interface to modify a legend and access its subparts. This interface provides access to the legend’s items and the LegendFormat object. ILegend also manages a few of the legend properties and methods such as the Title. When changing the properties of an existing legend, you must call ILegend.Refresh to have the changes reflected in the layout.
The construction of the legend is mostly the work of the map layers through the associated legend item objects. The legend can be seen as a collection of layers with each layer being represented by a legend item. When the legend is refreshed, the legend item creates a set of graphic elements to display itself, pulling the information from its associated layer and the format from the objects described in the previous section. The legend positions the title and legend item graphics relative to one another.
All legend items implement the ILegendItem interface. This interface controls the properties of a legend item—the layer with which it is associated; the number of columns it should span; whether it displays in a new column; and whether the label, description, heading, and layer name are displayed. This interface also provides access to the LegendClassFormat object.
North arrow, map title, and scale bar
The INorthArrow interface provides a common interface for North arrow properties, such as size, color, and reference location. IMarkerNorthArrow has one property, MarkerSymbol, that controls which marker symbol the North arrow uses. By default, the marker symbol belongs to the ESRI North font.
A map inset is a miniature map that typically shows a magnified view of an actual map. A MapInset map surround is another view of the current map extent. If you pan or zoom in on the map to which the MapInset is related, the MapInset mimics the change.
The MapTitle object is a map surround that holds a piece of text you can use to label a map. This may not be the title of the whole layout, but rather a subtitle for a specific map in the layout.
There are many types of scale bar map surrounds, including several types of scale lines, single-fill scale bars, and double-fill scale bars. All scale bars implement IScaleBar and IScaleMarks. The IScaleBar interface manages most of the properties of a scale bar, including bar color, bar height, division, and label frequency.

For further information see:

Map surrounds
Working with map surrounds

Map grids

The Carto library contains a set of map grid objects for displaying index and geographic reference grids on a map. A map grid can be a grid of geographic or projected coordinates, or a reference grid similar to those in street maps. Map grids are part of the layout of a map and can only be seen in layout view.
The map grid objects are shown in the following diagram:
To get to a map grid programmatically, navigate to the PageLayout coclass, then use the IGraphicsContainer.FindFrame method to get to the map’s MapFrame. The MapFrame coclass has an IMapGrids interface that provides access to all the map grids for that data frame.
IMapGrid provides access to the methods and properties common to all types of map grids. The Draw method can be used to draw a map grid to, for example, a PictureBox control that has a map and display associated with it. The PrepareForOutput method calls a device’s handle device context (HDC) before the Draw method.
Index grids
The IndexGrid object is a map grid that divides the map into a specified number of columns and rows. It is mainly used to index a map. IIndexGrid provides access to functionality common to all index grids. Using the XLabel and YLabel properties, you can set or retrieve the label for each column and index in the grid.
Measured grid
The MeasuredGrid object is a map grid with grid lines on a coordinate system specified using the IProjectedGrid interface.
A measured grid divides a map into a grid of units in a coordinate system of your choice. The grid can be in a projected coordinate system or in a geographic coordinate system. A measured grid in a geographic coordinate system is equivalent to a graticule. A measured grid can be in the same spatial reference system as the data frame or in a different one. To create a measured grid with a different projection, first create an instance of a coclass that inherits from SpatialReference. You can then set the IProjectedGrid.SpatialReference property of the grid with the ISpatialReference interface of this object.
Custom overlay grids
A custom overlay grid is a map grid with grid lines that are read from a feature. The ICustomOverlayGrid interface provides access to the feature class from which the grid lines are read through the ICustomOverlayGrid.DataSource property. The LabelField property allows you to specify the field in the feature class that will label the grid.
Map grid borders
The map grid border coclasses determine how the outline of a map grid is drawn. Using the IMapGridBorder interface, you can find the width of the map grid border. Using the DisplayName property, you can report the type of border object to which the IMapGridBorder interface is pointing. The CalibratedMapGridBorder coclass encapsulates the functionality required to draw a map grid outline consisting of a graduated band.
Grid labels
A grid label object is associated with every map grid object and provides the functionality required to draw labels around the map grid. The IGridLabel interface holds properties common to all types of grid labels. Not all grid labels can be used with all types of grids. The IGridLabel.Applies property returns true if the grid label can be used with the grid that you pass in as an argument.
Index grid tab styles
The index grid tab style coclasses provide the means to label an index grid. A background tab style labels the index grid using round, square, or rounded-square boxes. These boxes are centered outside the grid cells they border.
IBackgroundTabStyle has a BackgroundType property you can use to determine the shape of the boxes that the BackGroundTabStyle label uses using the esriBackgroundTabType enumeration.

For further information see:

Map grids
How to create map grids
Creating map grid labels

Renderers

The ArcGIS renderer coclasses and interfaces are found mainly in the Carto library. Renderers are objects that store symbolization for ArcGIS data layers and draw this data based on the stored symbolization rules. Layer coclasses and interfaces are also mainly in the Carto library. The renderer objects are divided into the following main groups:
  • Feature renderers—Objects that render feature data
  • Raster renderers—Objects that render raster data
  • Triangulated irregular network (TIN) renderers—Objects that render three-dimensional (3D) TIN data
The renderer objects are shown in the following diagram:
Renderers are assigned to layers using various interfaces depending on whether you're working with feature, raster, or TIN data. After changing a layer's renderer properties, or after assigning a new renderer to a layer, be sure to update the display and table of contents to reflect these changes.

For further information see:

Working with layers and renderers
Creating custom feature renderers
Cartographic representations
Managing custom feature renderers
How to define a renderer for your layer

Labeling and annotation

One of the key factors in creating a usable map is labeling (or annotating) features on the map. Labeling is the placing of text near a feature to provide information about that feature. Normally the label is based on attribute values of the feature itself, but it does not have to be.
The ArcGIS labeling environment offers a variety of methods for labeling features as well as for resolving conflicts when labels overlap each other. The labeling environment includes the ability to specify the features to be labeled (all features or features identified by a Structured Query Language [SQL] query for example); the expression that is used to label them (expressions can be simple or complex based on VBScript and JScript); placement options and weights for those placements; and priority specifications of one layer versus another. Depending on your requirements, it is also possible to label one layer with multiple expressions.
The objects in this model provide the ability to access all the parameters associated with the labeling of features. Advanced developers can also create their own expression-parsing engines for use in the labeling process.
While labeling dynamically with each Map refresh is a common way to manage text on a map, often there is a desire to refine the placement of labels via editing. Since labels are dynamically placed, they are not editable. To edit text, you need to convert labels to annotation. To make the conversion of labels to annotation easier, use the ConvertLabelsToAnnotation helper object. ConvertLabelsToAnnotation is a coarse grained object that performs the necessary steps to convert labels to annotation.
Annotation in ArcGIS is enabled through the use of a feature class extension. The AnnotationFeatureClassExtension object is used to configure the drawing properties and symbology for annotation features. Annotation feature classes are created using methods on the IAnnotationLayerFactory interface on the FDOGraphicsLayerFactory object.
Annotation features persist and draw text or graphic elements stored in the geodatabase. An annotation feature class (AnnoClass) can be feature linked or standalone. Feature linking allows the text of the annotation to be derived from the value of a related feature. The lifetime of the annotation is also controlled by the lifetime of the related feature. The IAnnotationClassExtension interface is used to access the properties of the annotation feature class extension.
Annotation features can persist (store) either an entire symbol inline or reference a symbol in a symbol collection. These two persistence mechanisms balance performance with flexibility.
Maplex for ArcGIS allows you to control how labels are placed relative to features, how labels are modified or reduced to allow more label placement when the available space is constrained, and how conflicts between labels are resolved when the available space is limited. The Maplex library contains objects that control the Maplex label placement engine. It is the main library of the Maplex for ArcGIS extension. It contains the principal object, MaplexOverposter, that represents the placement engine itself, and MaplexAnnotateMap that is used to create annotation and perform dynamic labeling. These objects should be used in conjunction with the Maplex placement property objects that are contained in the Carto library.

For further information see:

Working with labels and annotation
Converting labels to map annotation for a single layer
Converting labels to geodatabase annotation for an entire map
Maplex library overview

Dimensions

Dimensions are a special kind of annotation that show specific lengths or distances on a map. A dimension can indicate the length of a side of a building or land parcel or the distance between two features such as a fire hydrant and the corner of a building. Dimensions can be as simple as a piece of text with a leader line or more elaborate. In the geodatabase, dimensions are stored in dimension feature classes.
As with other feature classes in the geodatabase, all features in a dimension feature class have a geographic location and attributes and can either be inside or outside a feature dataset. As with annotation features, each dimension feature knows what its symbology is and how it should be drawn.
Dimensions in ArcGIS are enabled through the use of a feature class extension. The DimensionClassExtension object is used to configure the drawing properties and symbology of annotation features. Annotation feature classes are created using methods on the IAnnotationLayerFactory interface on the FDOGraphicsLayerFactory object.

Layers

Layers display geographic information on a map. A layer does not store the actual geographic data; rather it references the data contained in coverages, shapefiles, geodatabases, images, grids, and so on, then defines how to display this geographic data. Some layers do not refer to geographic data. For example, a GroupLayer refers to other layers, and a CompositeGraphicsLayer stores graphics.
Each type of layer object represents different types of data. Examples of layer objects include the following:
The third page of the Carto Object Model Diagram is a good place to start for an understanding of the various layer classes and the properties and methods that they support.
All layers inherit from an abstract class called Layer. The Layer class implements the following interfaces:
Creating a custom layer
You can write a custom layer to support an unsupported data type in ArcGIS or to change how a supported data type draws and behaves in ArcMap and the other ArcGIS applications.

For further information see:

Creating custom layers
How to add a layer to a map from a layer file
How to add different types of layers to a map
How to access a layer's underlying data
How to save a layer file

Dynamic maps and layers

Generally, layer types that reside in the Carto library are available for use across the entire ArcGIS platform. However, dynamic display capability is only supported in ArcGIS Engine. This means that IDynamicDisplay cannot be used for ArcGIS for Desktop or ArcGIS for Server development.
Dynamic display capabilities include moving large numbers of display objects and animations and updating location, orientation, size, status, and attribute information at sub-second refresh rates while sustaining smooth and uninterrupted navigation and support for geographic information system (GIS) data query. This feature is only available in ArcGIS Engine.
Dynamic display strengthens comprehensive display capabilities of dynamic maps in ArcObjects. It allows for smooth panning, zooming, rotation, navigation, and display of dynamic graphics. Dynamic display allows the display performance required of real-time applications while using the existing tools and layer functionality of ArcObjects.
The IDynamicMap interface is used for controlling the dynamic display. This interface is used for enabling and disabling the dynamic display and controlling global properties of the dynamic map. There is a one-to-one correspondence between maps and dynamic maps.
In conjunction with the ILayer and IGeoDataset interfaces, IDynamicLayer provides the mechanism to implement custom layers that draw dynamic content in dynamic mode.
Enable the DynamicMap class using the IDynamicMap interface implemented by the Map coclass. Use the IDynamicMap interface to enable or disable the dynamic display and to control the global properties of a dynamic map. When enabled, the dynamic display creates an OpenGL rendering context to draw the basic map layers as well as the dynamic layers that are drawn on top of the base layers.
A dynamic layer is a custom layer. To implement a custom layer, you need to, at a minimum, implement the ILayer interface. Implementing the ILayer interface enables the layer to be added to the map and the table of contents. To implement a dynamic layer, the custom layer needs to implement the IDynamicLayer interface.

For further information see:

Dynamic display
How dynamic display works
Rendering dynamic map content
Sample: Dynamic display layer

MapServer

The majority of the mapping objects are contained in the Carto and Display libraries. Typically, a mapping application will include objects from a variety of libraries. When working with maps in ArcGIS for Server applications, all such interaction is through the MapServer object.
MapServer is a coarse-grained ArcObjects component that allows you to display and query ArcGIS map documents bound to a MapServer object. MapServer can be used in desktop, intranet (local area network [LAN] or wide area network [WAN]), and Internet development environments.
In a desktop environment, MapServer objects can be created "in-process" within your application for map documents (.mxd and .pmf files) only. You can use MapServer, as well as other coarse-grained objects, as a shortcut for ArcObjects development.
Optimized MapServer objects (based on .msd files) cannot be created in-process and do not allow access to the fine grained objects unlike MapServer objects that are created based on a .mxd file. An optimized MapServer object does not support the following interfaces:
  • IMapServerData
  • IMapServerLayout
  • IMapServerObjects
  • IMapServerObjects2
Typically, MapServer objects are run in ArcGIS Server. When running in ArcGIS Server, MapServer objects can be accessed via the Server application programming interface (API) over Transmission Control Protocol/Internet Protocol (TCP/IP) (intranet), as well as accessed over Hypertext Transfer Protocol (HTTP) using SOAP/XML (Internet).
MapServer objects can be consumed by server-based Web applications. ArcGIS for Server provides an Application Developer Framework (ADF) for both .NET and Java. Web applications run on Web servers that are on the same LAN as a GIS server and access server objects via the server API. This allows you to create a wide range of GIS Web applications using ArcObjects. The ADF includes a set of Web templates, Web controls, and ArcObjects proxies.
ArcGIS for Server also includes a SOAP/XML toolkit that allows a MapServer object to be exposed as a Web service (HTTP connection). The Web service consumer can obtain the methods and types exposed by the MapServer Web service through its Web Service Description Language (WSDL). WSDL describes the definitions of SOAP requests and responses. They are part of the GIS server and are installed as part of the ArcGIS for Server install under <install directory>\XMLSchema.
The following MapServer interfaces do not support SOAP/XML:

For further information see:

Map services

ImageServer

An image service serves raster data. It represents a read-only view of a raster dataset or a mosaic view of a large collection of images through ArcGIS Server. An image service can be published from a raster dataset or a service definition file that is compiled using ArcGIS Image Server.
The ImageServer class supports accessing ArcGIS Server image services. It allows querying of image service information and fetching pixels from the server. The ImageServiceInfo value class is used to describe the service information, and the GeoImageDescription class is used to define the image information in pixel fetching.
The ImageServer class contains interfaces with basic functions for initializing ImageServer (IImageServerInit) and querying image service and fetching pixels (IImageServer).
IImageServerInit provides the following three ways to initialize an ImageServer class:
  • From a uniform resource locator (URL)
  • From a raster dataset
  • From a full name
IImageServer.ServiceInfo is used to query the information of the image service. IImageServer.ExportImage is used to export the retrieved image to a well known format (such as JPEG, PNG, BMP, or TIFF) and return it as MIME data or a URL. For a given image description, IImageServer.GetImage retrieves image data from the server as a byte array, which contains the pixel values in the form of band interleaved by pixels and followed by a NoData mask with a value of 1 or 0.
ImageServerInfo is a value object returned from IImageServer.ServiceInfo. It contains information that describes an image service. The IImageServiceInfo interface provides access to image service information, such as service description, spatial reference, extent, cell size, band statistics, and service data type. There is no colormap, histogram, or attribute table.
GeoImageDescription and IGeoImageDescription specify properties of an image to fetch from the server, including spatial reference, width, height, extent, interpolation method, compression and quality, NoData (background) value, band selection, and mosaic method.
ImageServer (IImageServer) is accessible via the SOAP and REST APIs.
For ArcObjects developers, an image service can be accessed and displayed directly using the ImageServerLayer class and the associated RasterStretchColorRampRenderer or RasterRGBRenderer class.

WCSServer

A Web Coverage Service (WCS) service is a service of ArcGIS for Server that serves raster data using the Open Geographic Consortium (OGC) WCS standard.
WCSServer is a server extension class that enables the WCS capability of a map service, a geodata service, or an image service. It handles the standard WCS requests (GetCapabilities, DescribeCoverage, and GetCoverage) from the server and returns this information as a byte array.
A WCS service can also be accessed directly using the WCSLayer class and visualized with RasterStretchColorRampRenderer and RasterRGBRenderer.

Service layers

The Internet is a vast resource for geospatial data. Organizations can publish their geographic data on the Internet. The data can then be consumed by a variety of clients. For instance, an organization can publish their map data using ArcGIS for Server or ArcIMS. Their clients can consume this content using ArcMap, ArcGIS Explorer, or ArcReader.
ArcGIS server map service layers
ArcGIS servers provide two types of map services: cached map services and dynamic map services. A cached map service is a collection of pre-rendered map tiles that has been created in advance, organized by scale levels, and stored in a directory hierarchy. A cached map service offers the fastest performance. A dynamic map service renders map images on the fly. Both of these are raster representations of a map.
Map Service layers are layers that reference a specific map service that resides on an ArcGIS server. You can access the map service either directly over a LAN (TCP/IP) or through the Internet (HTTP). The GISClient library manages the connection to the ArcGIS server. To work with a server object, such as a map service, in a stateful manner, or to work with the fine-grained ArcObjects, you must use the Server API.
Once you’ve made a connection to a server, you can add a map service to ArcMap by creating a map server layer. The MapServerLayer coclass allows you to display, query, and work with the contents of a map service. The extent of what you can do with a MapServerLayer, such as identifying or finding features, can be limited by restrictions set by the service administrator. MapServerLayer is a type of CompositeLayer. You can use ICompositeLayer to get a reference to the MapServerLayer’s sublayers (the MapServerSubLayer coclass).
ArcIMS layers
ArcIMS servers provide two types of map services: an ArcIMS feature service and an ArcIMS image service. An ArcIMS feature service is similar to a feature dataset that contains many feature classes. Each ArcIMS feature class represents a unique entity; the actual features are streamed to the client. An ArcIMS image service is a raster representation of a complete map.
ArcIMS layers are layers that reference a specific service that resides on an ArcIMS server. The GISClient library manages the connection to the ArcIMS server. Once you’ve made a connection to a server, you can add a service to ArcMap.
ArcIMS feature service layer
If you're working with an ArcIMS feature service layer, you create a group layer consisting of one or more feature layers. You work with these layers the same way you work with feature layers based on local feature classes. The one thing to remember is that features are being streamed over a network.
ArcIMS image service layer
If you're working with an ArcIMS image service layer, you create IMSMapLayer when you add the service to a map as a layer. The IMSMapLayer coclass allows you to display, query, and work with the contents of the image service. The extent of what you can accomplish with IMSMapLayer, such as identifying or finding features, can be limited by restrictions set by the service administrator. IMSMapLayer is a type of CompositeLayer. You can use ICompositeLayer to get a reference to IMSMapLayer’s sublayers (the IMSSubLayer coclass).
WMS layers
Another type of Internet service for geographic data is the OpenGIS Web Map Service (WMS). WMS is a Web mapping standard published by the OGC for use in providing maps created dynamically from the source geographic data. The maps or layers from a WMS are raster representations.
WMS layers are layers that reference a specific WMS service. The GISClient library manages the connection to the WMS server. Once you have a WMSConnection, you can use this coclass to obtain information about the WMS and the WMS layers within the service.
Once you add a WMS or feature to a map, a WMSMapLayer is created. WMSMapLayer is a container that holds one or more WMSGroupLayers and WMSLayers. The WMSMapLayer and WMSGroupLayer coclasses allow you to work with the contents of a WMS service. The WMSMapLayer is a type of CompositeLayer. You can use ICompositeLayer to get a reference to WMSGroupLayer or WMSLayer to manipulate, add, move, remove, and otherwise work with WMSGroupLayers and WMSLayers from a WMSMapLayer.
WCS layers
A WCS is a standard OGC specification for publishing and serving geospatial data as coverages (rasters). WCSLayer is a class used to access and display a coverage served though the OGC WCS. Since an OGC coverage is essentially a raster, WCSLayer supports most of the functions that a RasterLayer provides and can be visualized with two raster renderers: RasterStretchColorRampRenderer and RasterRGBRenderer.
Image Server layers
ArcGIS for Server can publish an image service from a raster dataset or a collection of images defined by the ISCDef file (Image Server Definition file). The ImageServerLayer class is used to access the properties of the image service, retrieve pixels dynamically from the server, and visualize requested pixels. ImageServerLayer supports most of the functions that a RasterLayer supports and can be displayed with two raster renderers: RasterStretchColorRampRenderer and RasterRGBRenderer.

GPS support

The ArcMap Global Positioning System (GPS) support coclasses and interfaces are located mainly in the Carto library. A few classes and interfaces, including GpsExtension are in the ArcMapUI library. The main coclass is RealTimeFeedManager. Through it, you can access and control a real-time feed from a GPS device or a simulated feed from a feature class. Use GpsFeed together with GpsConnection to control the connection to a GPS device. To replay data logged earlier or other appropriate data, use RealTimeFeedSimulator. Both GpsFeed and RealTimeFeedSimulator support the IRealTimeFeed interface. All information on the current position can be accessed through this interface.
RealTimeFeedManager provides access to IGpsDisplayProperties where you can customize how positions are displayed. The show properties, such as ShowCurrentPosition, turn on and off various attributes of the current position or the marker trails including the altitude, bearing, or speed. You can set the minimum and maximum altitude and speed values as well as the minimum and maximum sizes of the symbols used for the altitude values. The symbology of the speed is set through SpeedColorRamp. IGPSDisplayProperties also has methods to refresh or clear the GPS display.
The GPS toolbar supports a destination, and you can control the destination properties with IRealTimeDestination. ShowBearingToDestination and BearingToDestinationSymbol add a symbol to the current position that points to the active destination. DestinationLocation defines the position of the destination, while DestinationSymbol defines which symbol to use. You can also control DestinationLabel and DestinationTextSymbol.
You can display previous positions with markers or a linear trail with IPositionTrails. LinearTrailDistance and LinearTrailSymbol are the properties of a linear trail, while MarkerTrailDistance, MarkerTrailCount, MarkerTrailSymbol, and MarkerTrailColorRamp control various features of a marker trail. Turn trails on and off with the ShowMarkerTrails and ShowLinearTrail Boolean properties. You can store positions in a feature class through the IRealTimeLog interface. The StartLogging and StopLogging methods turn logging on and off, respectively, while the StampGpsPosition method writes the current position to the log file. The LogFile property defines the feature class to which positions will be logged. If you are streaming position to the log file, use LogRate, MinimumLogDeflectionAngle, or MinimumLogDistance to control the locations that are written to the log file.
To snap the current position to an existing layer, use IRealTimeFeedSnap. You can set the snapping distance, the layers to snap to, and whether to snap to nodes, lines, or vertices.
Many of the dynamic display samples have examples of working with the GpsConnection and RealTimeFeedManager classes including the following: