com.esri.arcgis.carto
Interface ILayer2

All Superinterfaces:
Serializable
All Known Implementing Classes:
BasemapSubLayer, CadAnnotationLayer, CadastralFabricSubLayer, CadFeatureLayer, CompositeGraphicsLayer, CoverageAnnotationLayer, DimensionLayer, FDOGraphicsLayer, FeatureLayer, GdbRasterCatalogLayer, GroupLayer, ILayer2Proxy, MosaicLayer, NALayer, NetworkLayer, ProcessLayer, RasterBasemapLayer, RasterCatalogLayer, RasterLayer, SchematicLayer, TemporalFeatureLayer, WMSGroupLayer

public interface ILayer2
extends Serializable

Provides access to additional members that work with all layers.

Description

ILayer2 is a generic interface for all layer objects. This interface has a method to draw the layer and provides access to generic layer properties. This interface adds to what is supported by ILayer by adding a property that indicates whether or not the scale range properties are read only and a property that lets you set the layer's area of interest.

Product Availability

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


Method Summary
 void draw(int drawPhase, IDisplay display, ITrackCancel trackCancel)
          Draws the layer to the specified display for the given draw phase.
 IEnvelope getAreaOfInterest()
          The default area of interest for the layer.
 double getMaximumScale()
          Maximum scale (representative fraction) at which the layer will display.
 double getMinimumScale()
          Minimum scale (representative fraction) at which the layer will display.
 String getName()
          Layer name.
 int getSupportedDrawPhases()
          Supported draw phases.
 String getTipText(double x, double y, double tolerance)
          Map tip text at the specified location.
 boolean isCached()
          Indicates if the layer needs its own display cache.
 boolean isScaleRangeReadOnly()
          Indicates if the minimum and maximum scale range values are read-only.
 boolean isShowTips()
          Indicates if the layer shows map tips.
 boolean isValid()
          Indicates if the layer is currently valid.
 boolean isVisible()
          Indicates if the layer is currently visible.
 void setAreaOfInterest(IEnvelope aoi)
          The default area of interest for the layer.
 void setCached(boolean cached)
          Indicates if the layer needs its own display cache.
 void setMaximumScale(double maxScale)
          Maximum scale (representative fraction) at which the layer will display.
 void setMinimumScale(double minScale)
          Minimum scale (representative fraction) at which the layer will display.
 void setName(String name)
          Layer name.
 void setShowTips(boolean show)
          Indicates if the layer shows map tips.
 void setSpatialReferenceByRef(ISpatialReference rhs1)
          Spatial reference for the layer.
 void setVisible(boolean visible)
          Indicates if the layer is currently visible.
 

Method Detail

getName

String getName()
               throws IOException,
                      AutomationException
Layer name.

Remarks

Use this property to associate a string with a layer.

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.

setName

void setName(String name)
             throws IOException,
                    AutomationException
Layer name.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

isValid

boolean isValid()
                throws IOException,
                       AutomationException
Indicates if the layer is currently valid.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

getAreaOfInterest

IEnvelope getAreaOfInterest()
                            throws IOException,
                                   AutomationException
The default area of interest for the layer.

Remarks

Returns the spatial-referenced extent of the layer.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

getMinimumScale

double getMinimumScale()
                       throws IOException,
                              AutomationException
Minimum scale (representative fraction) at which the layer will display.

Remarks

Specifies the minimum scale at which the layer will be displayed. This means that if you zoom out beyond this scale, the layer will not display. For example, specify 1000 to have the layer not display when zoomed out beyond 1:1000.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

setMinimumScale

void setMinimumScale(double minScale)
                     throws IOException,
                            AutomationException
Minimum scale (representative fraction) at which the layer will display.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

getMaximumScale

double getMaximumScale()
                       throws IOException,
                              AutomationException
Maximum scale (representative fraction) at which the layer will display.

Remarks

Specifies the maximum scale at which the layer will be displayed. This means that if you zoom in beyond this scale, the layer will not display. For example, specify 500 to have the layer not display when zoomed in beyond 1:500.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

setMaximumScale

void setMaximumScale(double maxScale)
                     throws IOException,
                            AutomationException
Maximum scale (representative fraction) at which the layer will display.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

isVisible

boolean isVisible()
                  throws IOException,
                         AutomationException
Indicates if the layer is currently visible.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

setVisible

void setVisible(boolean visible)
                throws IOException,
                       AutomationException
Indicates if the layer is currently visible.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

isShowTips

boolean isShowTips()
                   throws IOException,
                          AutomationException
Indicates if the layer shows map tips.

Remarks

Indicates whether or not map tips are shown for the layer. If set to True, then map tips will be shown for the layer. You can determine the text that will be shown via TipText. For a FeatureLayer, this text comes from the data for IFeatureLayer::DisplayField.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

setShowTips

void setShowTips(boolean show)
                 throws IOException,
                        AutomationException
Indicates if the layer shows map tips.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

getTipText

String getTipText(double x,
                  double y,
                  double tolerance)
                  throws IOException,
                         AutomationException
Map tip text at the specified location.

Product Availability

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

Parameters:
x - The x (in)
y - The y (in)
tolerance - The tolerance (in)
Returns:
The text
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

isCached

boolean isCached()
                 throws IOException,
                        AutomationException
Indicates if the layer needs its own display cache.

Remarks

This property indicates whether or not the layer requires its own display cache. If this property is True, then the Map will use a separate display cache for the layer so that it can be refreshed indpendently of other layers.

The Map is responsible for cache management. See IScreenDisplay::AddCache for more information on caches.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

setCached

void setCached(boolean cached)
               throws IOException,
                      AutomationException
Indicates if the layer needs its own display cache.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

getSupportedDrawPhases

int getSupportedDrawPhases()
                           throws IOException,
                                  AutomationException
Supported draw phases.

Remarks

Indicates the draw phases supported by the layer (esriDPGeography, esriDPAnnotation, esriDPSelection, or any combination of the three). The supported draw phases are defined by esriDrawPhase. When multiple draw phases are supported, the sum of the constants is used. For example, if SupportedDrawPhases = 3 then the layer supports drawing in the geography and annotation phases.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

setSpatialReferenceByRef

void setSpatialReferenceByRef(ISpatialReference rhs1)
                              throws IOException,
                                     AutomationException
Spatial reference for the layer.

Remarks

This property is only used for map display, setting this property does not change the spatial reference of the layer's underlying data. The ArcGIS framework uses this property to pass the spatial reference from the map to the layer in order to support on-the-fly projection.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

draw

void draw(int drawPhase,
          IDisplay display,
          ITrackCancel trackCancel)
          throws IOException,
                 AutomationException
Draws the layer to the specified display for the given draw phase.

Remarks

This method draws the layer to the Display for the specified DrawPhase. Use the TrackCancel object to allow the drawing of the layer to be interrupted by the user.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Parameters:
drawPhase - A com.esri.arcgis.system.esriDrawPhase constant (in)
display - A reference to a com.esri.arcgis.display.IDisplay (in)
trackCancel - A reference to a com.esri.arcgis.system.ITrackCancel (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

isScaleRangeReadOnly

boolean isScaleRangeReadOnly()
                             throws IOException,
                                    AutomationException
Indicates if the minimum and maximum scale range values are read-only.

Remarks

Some layer types do not support a writeable MinimumScale or MaximumScale. Use this property to determine whether or not a layer supports this.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

setAreaOfInterest

void setAreaOfInterest(IEnvelope aoi)
                       throws IOException,
                              AutomationException
The default area of interest for the layer.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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