com.esri.arcgis.carto
Interface ILayer

All Superinterfaces:
Serializable
All Known Subinterfaces:
ICadLayer, IFeatureLayer, IGeoFeatureLayer, IGroupLayer, IImageServerLayer, IIMSMapLayer, IKmlLayer, ILasDatasetLayer, INITFGraphicsLayer, IRasterCatalogLayer, IRasterLayer, ITerrainLayer, ITerrainLayer2, ITinLayer, ITinLayer2
All Known Implementing Classes:
BasemapLayer, CadAnnotationLayer, CadastralFabricLayer, CadastralFabricSubLayer, CadFeatureLayer, CadLayer, CompositeGraphicsLayer, CoverageAnnotationLayer, DimensionLayer, DummyGraduatedMarkerLayer, DummyLayer, FDOGraphicsLayer, FDOGraphicsSublayer, FeatureLayer, GdbRasterCatalogLayer, GeoVideoLayer, GlobeGraphicsLayer, GlobeLayer, GlobeServerLayer, GraphicsLayer3D, GraphicsSubLayer, GroupLayer, IFeatureLayerProxy, IGeoFeatureLayerProxy, IGroupLayerProxy, ILayerProxy, ImageServerLayer, IMSMapLayer, IMSSubFeatureLayer, IMSSubLayer, KmlLayer, LasDatasetLayer, MapServerBasicSublayer, MapServerFindSublayer, MapServerIdentifySublayer, MapServerLayer, MapServerQuerySublayer, MapServerRESTLayer, MapServerRESTSubLayer, MosaicLayer, NALayer, NetworkLayer, NITFGraphicsLayer, ProcessLayer, RasterBasemapLayer, RasterCatalogLayer, RasterLayer, SchematicLayer, SearchResultsLayer, TemporalFeatureLayer, TerrainLayer, TinLayer, TopologyLayer, WCSLayer, WMSGroupLayer, WMSLayer, WMSMapLayer, WMTSLayer

public interface ILayer
extends Serializable

Provides access to members that work with all layers.

Superseded By

ILayer2

Description

ILayer is a generic interface for all layer objects. This interface has a method to draw the layer and provides access to generic layer properties.

Remarks

This interface has a method to draw the layer and properties to define the minimum and maximum display scales, the spatial reference, the name, layer visibility, whether or not the layer is cached, and whether or not the layer shows map tips.

There are also properties that indicate whether the layer is valid, its supported draw phases, area of interest, and the map tip text for a given coordinate.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux


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 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 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.

Description


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.

Description

Use the Name property to associate a string with the layer.

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.

Remarks

The valid property indicates if the layer is currently valid. Layers that reference feature classes are valid when they hold a reference to a valid feature class. The property does not however validate the integrity of the feature classes reference to the database. Therefore, in rare situations if a datasource is removed after a layer is initialized, the layer will report itself as valid but query attempts to the data source will error due to the lack of underlying data.

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.

Description

MinimumScale property specifies the minimum scale at which the layer will be displayed. Assign a Double value to set this property.

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.

Description

MaximumScale property specifies the maximum scale at which the layer will be displayed. Assign a Double value to set this property.

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.

Description

Use Visible property to set the visibility of the layer. When assigned False, the layer is invisible in the current view.

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.

Description

ShowTips is set to True when the layer shows map tips specified in the TipText property.

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.

Description

Use Cached property to indicate if the layer needs its own cache for display.

Remarks

Informational property. Container is responsible for cache management.

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.