com.esri.arcgis.carto
Interface ILayerDescription

All Superinterfaces:
java.io.Serializable
All Known Subinterfaces:
ILayerDescription2
All Known Implementing Classes:
ILayerDescription2Proxy, ILayerDescriptionProxy, LayerDescription

public interface ILayerDescription
extends java.io.Serializable

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

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

When To Use

Use the ILayerDescription interface to access read and write properties of a layer.

Remarks

Please note the difference of use between IMapLayerInfo and ILayerDescription: Use ILayerDescription to access layer settings that can be changed on the server object without changing the state of the underlying fine-grained ArcObjects that the layer is based on. MapLayerInfo is used to retrieve information about a layer that can only be changed by directly accessing the map document or the fine-grained ArcObjects it is based on.

Layer 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
 java.lang.String getDefinitionExpression()
          The definition expression for the layer.
 int getID()
          The layer ID.
 double getSelectionBufferDistance()
          The selection buffer distance.
 IColor getSelectionColor()
          The selection color (used when SetSelectionSymbol = FALSE).
 IFIDSet getSelectionFeatures()
          Array of selected features.
 ISymbol getSelectionSymbol()
          The selection symbol.
 boolean isScaleSymbols()
          Indicates whether the layer should scale its symbols according to the reference scale.
 boolean isSetSelectionSymbol()
          Indicates if the selected set of features is drawn using the SelectionSymbol.
 boolean isShowLabels()
          Indicates whether the layer should display its dynamic labels.
 boolean isShowSelectionBuffer()
          Indicates whether the selection buffer should be displayed.
 boolean isVisible()
          Indicates whether the layer is visible as defined in the TOC (i.e.
 void setDefinitionExpression(java.lang.String expression)
          The definition expression for the layer.
 void setID(int layerID)
          The layer ID.
 void setScaleSymbols(boolean scale)
          Indicates whether the layer should scale its symbols according to the reference scale.
 void setSelectionBufferDistance(double distance)
          The selection buffer distance.
 void setSelectionColorByRef(IColor color)
          The selection color (used when SetSelectionSymbol = FALSE).
 void setSelectionFeatures(IFIDSet featureIDs)
          Array of selected features.
 void setSelectionSymbolByRef(ISymbol symbol)
          The selection symbol.
 void setSetSelectionSymbol(boolean setSymbol)
          Indicates if the selected set of features is drawn using the SelectionSymbol.
 void setShowLabels(boolean show)
          Indicates whether the layer should display its dynamic labels.
 void setShowSelectionBuffer(boolean show)
          Indicates whether the selection buffer should be displayed.
 void setVisible(boolean visible)
          Indicates whether the layer is visible as defined in the TOC (i.e.
 

Method Detail

getID

public int getID()
          throws java.io.IOException,
                 AutomationException
The layer ID. This is a unique ID for the layer, and is used to identify the layer in a number of method calls.

Supported Platforms

Windows, Solaris, Linux

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

setID

public void setID(int layerID)
           throws java.io.IOException,
                  AutomationException
The layer ID. This is a unique ID for the layer, and is used to identify the layer in a number of method calls.

Supported Platforms

Windows, Solaris, Linux

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

isVisible

public boolean isVisible()
                  throws java.io.IOException,
                         AutomationException
Indicates whether the layer is visible as defined in the TOC (i.e. marked on).

Supported Platforms

Windows, Solaris, Linux

Remarks

This property only reflects the layer's on/off state in the TOC. A layer's visibility property may be TRUE and the layer may still not be visible on the map. This occurs when a layer is marked "on" but is not drawn in the map display because its display is dependent on the scale of the map.

Use VisibleLayers on IMapImage to retrieve an array of layers that are both "on" in the TOC and visible in the map display.

You can also use MinScale and MaxScale on IMapLayerInfo to see if the layer has any scale dependencies and then use MapScale on IMapImage or ComputeScale on IMapServer to determine the map scale. If the map scale falls outside the specified scale range set for the layer, the layer will not display.  

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

setVisible

public void setVisible(boolean visible)
                throws java.io.IOException,
                       AutomationException
Indicates whether the layer is visible as defined in the TOC (i.e. marked on).

Supported Platforms

Windows, Solaris, Linux

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

isScaleSymbols

public boolean isScaleSymbols()
                       throws java.io.IOException,
                              AutomationException
Indicates whether the layer should scale its symbols according to the reference scale.

Supported Platforms

Windows, Solaris, Linux

Remarks

In order for symbols to scale, the map must have a reference scale set and the layer must support symbol scaling. Use ScaleSymbols to activate or deactivate a layer's symbol scaling. If a map does not have a set reference scale setting, ScaleSymbols will have no effect. Use CanScaleSymbols on IMapLayerInfo to verify if a layer supports symbol scaling. A reference scale is set within the original map document.

You can set a new reference scale for the MapServer object by accessing the IMap interface through 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.

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

setScaleSymbols

public void setScaleSymbols(boolean scale)
                     throws java.io.IOException,
                            AutomationException
Indicates whether the layer should scale its symbols according to the reference scale.

Supported Platforms

Windows, Solaris, Linux

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

isShowLabels

public boolean isShowLabels()
                     throws java.io.IOException,
                            AutomationException
Indicates whether the layer should display its dynamic labels.

Supported Platforms

Windows, Solaris, Linux

Remarks

This only applies to layers where the property HasLabels on IMapLayerInfo is TRUE. This means that the layer's labels must be "on" in the original map document.

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

setShowLabels

public void setShowLabels(boolean show)
                   throws java.io.IOException,
                          AutomationException
Indicates whether the layer should display its dynamic labels.

Supported Platforms

Windows, Solaris, Linux

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

getSelectionFeatures

public IFIDSet getSelectionFeatures()
                             throws java.io.IOException,
                                    AutomationException
Array of selected features.

Supported Platforms

Windows, Solaris, Linux

Remarks

If you want to clear the selection, set SelectionFeatures to Null/Nothing. If you forget to do this, the previous selection will be added to the current selection.

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

setSelectionFeatures

public void setSelectionFeatures(IFIDSet featureIDs)
                          throws java.io.IOException,
                                 AutomationException
Array of selected features.

Supported Platforms

Windows, Solaris, Linux

Parameters:
featureIDs - A reference to a com.esri.arcgis.geodatabase.IFIDSet (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 selection color (used when SetSelectionSymbol = FALSE).

Supported Platforms

Windows, Solaris, Linux

Description

The color with which selected features for this particular layer are drawn.

Remarks

This property should be used when you want to apply a different selection color for an individual layer. If you wish to change the selection color for all layers you should use SelectionColor on IMapDescription. If you wish to change the symbology of selected features you need to use SetSelectionSymbol and SelectionSymbol on ILayerDescription


SelectionColor on ILayerDescription overrides SelectionColor on IMapDescription. If SetSelectionSymbol is set to TRUE, SelectionColor will not be applied. Instead, the selection color of the symbol you specify (SelectionSymbol) will be used.

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.

setSelectionColorByRef

public void setSelectionColorByRef(IColor color)
                            throws java.io.IOException,
                                   AutomationException
The selection color (used when SetSelectionSymbol = FALSE).

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.

getSelectionSymbol

public ISymbol getSelectionSymbol()
                           throws java.io.IOException,
                                  AutomationException
The selection symbol.

Supported Platforms

Windows, Solaris, Linux

Remarks

Use this property when you want something other than the default symbology to indicate selected features. For example, you want to use a star symbol to indicate selected point features. SelectionSymbol is only applied if SetSelectionSymbol is set to TRUE. Otherwise, default symbols are used.

Only ISimpleMarkerSymbol, ICharacterMarkerSymbol, IPictureMarkerSymbol, ISimpleLineSymbol and ISimpleFillSymbol, IPictureFillSymbol are supported when accessing a MapServer object through AGSServerConnection (LAN or internet).

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

setSelectionSymbolByRef

public void setSelectionSymbolByRef(ISymbol symbol)
                             throws java.io.IOException,
                                    AutomationException
The selection symbol.

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

isSetSelectionSymbol

public boolean isSetSelectionSymbol()
                             throws java.io.IOException,
                                    AutomationException
Indicates if the selected set of features is drawn using the SelectionSymbol.

Supported Platforms

Windows, Solaris, Linux

Remarks

This property should be set to TRUE if you wish to use something other than the default selection symbology. For example, you want to use a star symbol to indicate selected point features. If SetSelectionSymbol is set to TRUE, SelectionColor will not be applied. You will need to set the selection color as part of the properties of the new selection symbol object.

Only ISimpleMarkerSymbol, ICharacterMarkerSymbol, IPictureMarkerSymbol, ISimpleLineSymbol and ISimpleFillSymbol, IPictureFillSymbol are supported when accessing a MapServer object through AGSServerConnection (LAN or internet).

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

setSetSelectionSymbol

public void setSetSelectionSymbol(boolean setSymbol)
                           throws java.io.IOException,
                                  AutomationException
Indicates if the selected set of features is drawn using the SelectionSymbol.

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

getSelectionBufferDistance

public double getSelectionBufferDistance()
                                  throws java.io.IOException,
                                         AutomationException
The selection buffer distance. When drawing, and if a selection filter is specified, a buffer zone of the specified distance will be displayed around the selected features.

Supported Platforms

Windows, Solaris, Linux

Remarks

The selection buffer is based on Euclidian distance. The accuracy of the buffer is dependent on the spatial reference used in the map. An inappropriate spatial reference will result in inaccurate buffer distances. For best results, the map should be in an appropriate spatial reference.

In order to control the amount of information MapServer needs to process for a buffer, a maximum number of records to be buffered can be set. This value is contained in the MaxBufferCount property. The default value for this property is 100. If the number of features to be buffered exceeds MaxBufferCount no features will be buffered. The MaxBufferCount can also be changed by modifying the MaxRecordCount XML tag in the MapServer's configuration file.

 

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

setSelectionBufferDistance

public void setSelectionBufferDistance(double distance)
                                throws java.io.IOException,
                                       AutomationException
The selection buffer distance. When drawing, and if a selection filter is specified, a buffer zone of the specified distance will be displayed around the selected features.

Supported Platforms

Windows, Solaris, Linux

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

isShowSelectionBuffer

public boolean isShowSelectionBuffer()
                              throws java.io.IOException,
                                     AutomationException
Indicates whether the selection buffer should be displayed.

Supported Platforms

Windows, Solaris, Linux

Remarks

The selection buffer is based on Euclidian distance. The accuracy of the buffer is dependent on the spatial reference used in the map. An inappropriate spatial reference will result in inaccurate buffer distances. For best results, the map should be in an appropriate spatial reference.

In order to control the amount of information MapServer needs to process for a buffer, a maximum number of records to be buffered can be set. This value is contained in the MaxBufferCount property. The default value for this property is 100. If the number of features to be buffered exceeds MaxBufferCount no features will be buffered. The MaxBufferCount can also be changed by modifying the MaxRecordCount XML tag in the MapServer's configuration file.

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

setShowSelectionBuffer

public void setShowSelectionBuffer(boolean show)
                            throws java.io.IOException,
                                   AutomationException
Indicates whether the selection buffer should be displayed.

Supported Platforms

Windows, Solaris, Linux

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

getDefinitionExpression

public java.lang.String getDefinitionExpression()
                                         throws java.io.IOException,
                                                AutomationException
The definition expression for the layer.

Supported Platforms

Windows, Solaris, Linux

Remarks

Use DefinitionExpression to display a subset of the layer's features.

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

setDefinitionExpression

public void setDefinitionExpression(java.lang.String expression)
                             throws java.io.IOException,
                                    AutomationException
The definition expression for the layer.

Supported Platforms

Windows, Solaris, Linux

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