com.esri.arcgis.carto
Interface IMapServerLegendInfo

All Superinterfaces:
Serializable
All Known Implementing Classes:
MapServerLegendInfo

public interface IMapServerLegendInfo
extends Serializable

Provides access to the Map Server Legend Info Interface.

Remarks

MapServerLegendInfo objects are the result of a GetLegendInfo method on IMapServer. Legends are associated with renderers that belong to each layer in a map. Each layer has a separate renderer. Each renderer has one or more legend groups. Each legend group has one or more legend classes.

MapServerLegendInfo doesn't contain information about whether the data frame and the layers in the TOC are expanded or collapsed in the original map document. You have to write your own code to find this out.

When To Use

Use IMapServerLegendInfo to retrieve individual legend elements including the symbol image, labels, descriptions and headings. A common use would be to populate a table of contents. To export a single image of the legend use ExportLegend on IMapServerLayout.

Product Availability

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


Method Summary
 int getLayerID()
          The layer ID.
 String getLayerName()
          The layer name.
 IMapServerLegendGroups getLegendGroups()
          A collection of legend group objects.
 

Method Detail

getLayerID

int getLayerID()
               throws IOException,
                      AutomationException
The layer ID.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Returns:
The layerID
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getLayerName

String getLayerName()
                    throws IOException,
                           AutomationException
The layer name.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Returns:
The name
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getLegendGroups

IMapServerLegendGroups getLegendGroups()
                                       throws IOException,
                                              AutomationException
A collection of legend group objects.

Remarks

Legends are associated with renderers that belong to each layer in a map. Each layer has a separate renderer. Each renderer has one or more legend groups. Each legend group has one or more legend classes.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Returns:
A reference to a com.esri.arcgis.carto.IMapServerLegendGroups
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.