com.esri.arcgis.carto
Interface IMapDescription

All Superinterfaces:
java.io.Serializable
All Known Implementing Classes:
IMapDescriptionProxy, MapDescription

public interface IMapDescription
extends java.io.Serializable

Provides access to the available properties of a map description object.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

When To Use

 Use the IMapDescription interface to access read and write properties of a map (data frame).

Remarks

Use IMapDescription to access map settings that can be changed on the server object without changing the state of the underlying fine-grained ArcObjects that the map document is based on. Please note the difference between IMapServerInfo and IMapDescription. MapServerInfo is used to retrieve information about a map, such as the name of the map, the background color or the spatial extent for the map. These settings cannot be changed without direct access to the map document or the fine-grained ArcObjects it is based on.

Map settings of the Server object can be permanently changed by accessing fine-grained ArcObjects. This is accomplished using IMapServerObjects. This should be done with objects in a non-pooled environment.  Changing the state of pooled objects this way will lead to unexpected results.


Method Summary
 IGraphicElements getCustomGraphics()
          Custom graphics.
 ILayerDescriptions getLayerDescriptions()
          A collection of Layer Description objects, each describing a layer within the map (data frame).
 IMapArea getMapArea()
          The display area of the map (data frame).
 double getMapRotation()
          The angle/rotation of the map (data frame) in degrees, measured anti-clockwise.
 java.lang.String getName()
          The name of the map (data frame).
 IColor getSelectionColor()
          The default selection color.
 ISpatialReference getSpatialReference()
          The spatial reference of the map (data frame).
 IColor getTransparentColor()
          The color that is transparent (100 %).
 void setCustomGraphics(IGraphicElements elements)
          Custom graphics.
 void setLayerDescriptions(ILayerDescriptions layerDescriptions)
          A collection of Layer Description objects, each describing a layer within the map (data frame).
 void setMapArea(IMapArea area)
          The display area of the map (data frame).
 void setMapRotation(double angleDegrees)
          The angle/rotation of the map (data frame) in degrees, measured anti-clockwise.
 void setName(java.lang.String name)
          The name of the map (data frame).
 void setSelectionColor(IColor color)
          The default selection color.
 void setSpatialReferenceByRef(ISpatialReference spatialReference)
          The spatial reference of the map (data frame).
 void setTransparentColor(IColor color)
          The color that is transparent (100 %).
 

Method Detail

getName

public java.lang.String getName()
                         throws java.io.IOException,
                                AutomationException
The name of the map (data frame).

Supported Platforms

Windows, Solaris, Linux

Remarks

 If two (or more) data frames have the same name in the map document, MapServer adds a distinctive number at the end of the second name. E.g. Layers and Layers2.

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

setName

public void setName(java.lang.String name)
             throws java.io.IOException,
                    AutomationException
The name of the map (data frame).

Supported Platforms

Windows, Solaris, Linux

Parameters:
name - The name (in)
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getMapArea

public IMapArea getMapArea()
                    throws java.io.IOException,
                           AutomationException
The display area of the map (data frame).

Supported Platforms

Windows, Solaris, Linux

Remarks

MapArea contains the abstract IMapArea interface.  With this interface you can retrieve the extent of a map or bookmark (IMapServerBookmark).  If you want to change the extent of a map use IMapExtent, ICenterAndSize, ICenterAndScale and IFeatureExtent. By default, the MapArea object is of type MapExtent.

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

setMapArea

public void setMapArea(IMapArea area)
                throws java.io.IOException,
                       AutomationException
The display area of the map (data frame).

Supported Platforms

Windows, Solaris, Linux

Parameters:
area - A reference to a com.esri.arcgis.carto.IMapArea (in)
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getLayerDescriptions

public ILayerDescriptions getLayerDescriptions()
                                        throws java.io.IOException,
                                               AutomationException
A collection of Layer Description objects, each describing a layer within the map (data frame).

Supported Platforms

Windows, Solaris, Linux

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

setLayerDescriptions

public void setLayerDescriptions(ILayerDescriptions layerDescriptions)
                          throws java.io.IOException,
                                 AutomationException
A collection of Layer Description objects, each describing a layer within the map (data frame).

Supported Platforms

Windows, Solaris, Linux

Parameters:
layerDescriptions - A reference to a com.esri.arcgis.carto.ILayerDescriptions (in)
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getMapRotation

public double getMapRotation()
                      throws java.io.IOException,
                             AutomationException
The angle/rotation of the map (data frame) in degrees, measured anti-clockwise.

Supported Platforms

Windows, Solaris, Linux

Remarks

Map rotation is a property of a map. An exported map image or exported layout image should respect the map rotation value. However, once a MapServer Object has been added to ArcMap it is now a layer and this rotation value is dropped. The reason for this is, in ArcMap, when a layer is added to a map, the layer adjusts to fit the spatial reference and existing rotation of the  map.  If the default rotation of a new ArcMap document is zero, a MapServer object layer will lose any rotation when added to a new ArcMap session. The MapRotation value does not change, only the display of the MapServer Layer.

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

setMapRotation

public void setMapRotation(double angleDegrees)
                    throws java.io.IOException,
                           AutomationException
The angle/rotation of the map (data frame) in degrees, measured anti-clockwise.

Supported Platforms

Windows, Solaris, Linux

Parameters:
angleDegrees - The angleDegrees (in)
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getSpatialReference

public ISpatialReference getSpatialReference()
                                      throws java.io.IOException,
                                             AutomationException
The spatial reference of the map (data frame).

Supported Platforms

Windows, Solaris, Linux

Remarks

Use SpatialReference to retrieve or set a spatial reference for a map. If the spatial reference for a map has been changed, remember to assign the new spatial reference to any subsequent geometry used to change the map area or identify or select features.

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

setSpatialReferenceByRef

public void setSpatialReferenceByRef(ISpatialReference spatialReference)
                              throws java.io.IOException,
                                     AutomationException
The spatial reference of the map (data frame).

Parameters:
spatialReference - A reference to a com.esri.arcgis.geometry.ISpatialReference (in)
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getCustomGraphics

public IGraphicElements getCustomGraphics()
                                   throws java.io.IOException,
                                          AutomationException
Custom graphics.

Supported Platforms

Windows, Solaris, Linux

Remarks

Use CustomGraphics to display text or geometric shapes on the map. When interacting with the display of labels, CustomGraphics will honor the Feature Weight value for the default graphics layer set in the Label Weight Ranking dialog in the map document. A setting of High, the ArcMap default, will result in labels not drawing within the bounds of the custom graphics. If the Feature Weight for the default graphics layer is None, Low or Medium labels will draw within the bounds of the custom graphics. With None, all labels should display. With Low or Medium, the amount of labels that draw may vary.

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

setCustomGraphics

public void setCustomGraphics(IGraphicElements elements)
                       throws java.io.IOException,
                              AutomationException
Custom graphics.

Supported Platforms

Windows, Solaris, Linux

Parameters:
elements - A reference to a com.esri.arcgis.carto.IGraphicElements (in)
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getTransparentColor

public IColor getTransparentColor()
                           throws java.io.IOException,
                                  AutomationException
The color that is transparent (100 %).

Supported Platforms

Windows, Solaris, Linux

Remarks

Setting a transparent color is valid only for formats that support transparency. These include: png, png24 and gif.

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

setTransparentColor

public void setTransparentColor(IColor color)
                         throws java.io.IOException,
                                AutomationException
The color that is transparent (100 %).

Supported Platforms

Windows, Solaris, Linux

Parameters:
color - A reference to a com.esri.arcgis.display.IColor (in)
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getSelectionColor

public IColor getSelectionColor()
                         throws java.io.IOException,
                                AutomationException
The default selection color.

Supported Platforms

Windows, Solaris, Linux

Description

The color with which all selected features in the map are drawn.

Remarks

Set this property when you wish to change the default selection color for all layers in the map. The ArcMap default selection color is cyan. This color applies to all layers within the map. If you want to use different selection colors for individual layers, use SelectionColor on ILayerDescription. The default selection symbols for a map are: a circle for points, a solid line for lines and a hollow fill (solid outline) for polygons. If you want to change the selection symbol for a layer, use SelectionSymbol on ILayerDescription.

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

setSelectionColor

public void setSelectionColor(IColor color)
                       throws java.io.IOException,
                              AutomationException
The default selection color.

Parameters:
color - A reference to a com.esri.arcgis.display.IColor (in)
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.