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


IMapServerLayout Interface (ArcObjects .NET 10.8 SDK)
ArcObjects Help for .NET developers > ArcObjects Help for .NET developers > ArcObjects namespaces > Carto > ESRI.ArcGIS.Carto > Interfaces > IM > IMapServerLayout Interface
ArcGIS Developer Help

IMapServerLayout Interface

Provides access to members that serve layout components of maps.

Product Availability

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

When To Use

Use IMapServerLayout to export the existing map layout or to export a legend, north arrow or a scale bar of an existing map.  Also use IMapServerLayout to convert screen coordinates to page coordinates on the layout and vice versa. Do not use IMapServerLayout to create new layouts or to create layouts "on-the-fly".

This interface is not supported by optimized MapServer.

Members

Name Description
Read-only property DefaultPageDescription The default page settings.
Method ExportLayout Generates an image of the layout, based on the given page description object, and writes the image to a specified file on disk. Supported file types are: 'bmp', 'jpg', 'tif', 'png'/'png8', 'png24', 'emf', 'ps', 'pdf', 'ai', 'gif', and 'svg'/'svgz'.
Method ExportLegend Exports a legend to an image file. The client can create the legend object and set its desired properties appropriately. If legend is Nothing/Null, a default legend will be generated.
Method ExportNorthArrow Exports a north arrow to an image file. The client can create the arrow object and set its desired properties appropriately. If arrow is Nothing/Null, a default north arrow will be generated.
Method ExportScaleBar Exports a scale bar to an image file. The client can create the scaleBar object and set its desired properties appropriately. If scaleBar is Nothing/Null, a default scale bar will be generated.
Method FromPagePoints Converts a page coordinate to a screen location.
Method ToPagePoints Converts a screen location to a page coordinate.

Classes that implement IMapServerLayout

Classes Description
MapServer The MapServer component provides programmatic access to the contents of a map document on disk, and creates images of the map contents based on user requests. Designed for use in building map-based web services and web applications.

Remarks

Some layout elements can change dynamically when accessed by IMapServerLayout. Data frames in the layout will reflect any changes in MapDescription. Scale bars, scale text, north arrow and legends linked to data frames will adjust to these changes. Two properties of IPageDescription, CustomGraphics and Extent, also provide dynamic utility. For example, use CustomGraphics to place dynamic titles for your exported layouts or use extent to "zoom in" on a portion of the layout page. Furthermore, the image type and size of the exported layout can also be controlled using the input parameter ImageDescription object in the method ExportLayout. Remember, this is the size of the image, not the size of the actual layout. The page size of the layout is determined in the map document. ImageDescription is also used with IMapServerLayout methods ExportLegend, ExportScaleBar and ExportNorthArrow .

Do not use IMapServerLayout to create new layouts or to create layouts "on-the-fly". You cannot change the actual page size of the map layout, reposition map elements on the layout nor can you add or remove layout elements such as titles, text, graphics, scale bars, north arrows and legends.