com.esri.arcgis.carto
Interface IFeatureLayer2

All Superinterfaces:
Serializable
All Known Implementing Classes:
CadAnnotationLayer, CadastralFabricSubLayer, CadFeatureLayer, CoverageAnnotationLayer, DimensionLayer, FDOGraphicsLayer, FeatureLayer, GdbRasterCatalogLayer, IFeatureLayer2Proxy, TemporalFeatureLayer

public interface IFeatureLayer2
extends Serializable

Provides access to additional members that control common aspects of a feature layer.

Description

Provides access to the properties and methods of a layer based on vector geographic data, which is typically a geodatabase, shapefile, or coverage feature class.

Remarks

This interface provides access to all properties and methods of IFeatureLayer as well as one new read-only property (ShapeType) and method (ExpandRegionForSymbols).

Product Availability

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


Method Summary
 void expandRegionForSymbols(IDisplay display, IGeometry region)
          Expands the given geometry by an amount that will include the layer's symbology for the given display.
 String getDataSourceType()
          Data source type.
 String getDisplayField()
          Primary display field.
 IFeatureClass getFeatureClass()
          The layer's feature class.
 int getShapeType()
          The layer's shape type.
 boolean isScaleSymbols()
          Indicates if symbols are scaled for the layer.
 boolean isSelectable()
          Indicates if layer is selectable.
 IFeatureCursor search(IQueryFilter queryFilter, boolean recycling)
          Creates a cursor based upon the search criteria.
 void setDataSourceType(String text)
          Data source type.
 void setDisplayField(String fieldName)
          Primary display field.
 void setFeatureClassByRef(IFeatureClass fclass)
          The layer's feature class.
 void setScaleSymbols(boolean scale)
          Indicates if symbols are scaled for the layer.
 void setSelectable(boolean value)
          Indicates if layer is selectable.
 

Method Detail

getFeatureClass

IFeatureClass getFeatureClass()
                              throws IOException,
                                     AutomationException
The layer's feature class.

Description

The FeatureClass data source for 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.geodatabase.IFeatureClass
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setFeatureClassByRef

void setFeatureClassByRef(IFeatureClass fclass)
                          throws IOException,
                                 AutomationException
The layer's feature class.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

getDataSourceType

String getDataSourceType()
                         throws IOException,
                                AutomationException
Data source type.

Description

Describes the type of data referenced by the feature layer. In ArcMap and ArcCatalog this description appears on the layer's properties dialog on the Source tab after "Data Type:"

Remarks

By default, the DataSourceType for a layer matches the value returned by IDataset::Category when you access the layer's feature class through IDataset. You can set a layer's DataSourceType to any string.

Here is a list of default values for DataSourceType for common feature layer types:

Layer Type Value
Personal Geodatabase "Personal Geodatabase Feature Class"
SDE "SDE Feature Class"
Shapefile "Shapefile Feature Class"
ArcInfo or PC ArcInfo Coverage (annotation) "Annotation Feature Class"
ArcInfo or PC ArcInfo Coverage (point) "Point Feature Class"
ArcInfo or PC ArcInfo Coverage (line) "Arc Feature Class"
ArcInfo or PC ArcInfo Coverage (polygon) "Polygon Feature Class"
Edge "StreetMap Feature Class"
CAD (annotation) "CAD Annotation Feature Class"
CAD (point) "CAD Point Feature Class"
CAD (line) "CAD Polyline Feature Class"
CAD (polygon) "CAD Polygon Feature Class"

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

setDataSourceType

void setDataSourceType(String text)
                       throws IOException,
                              AutomationException
Data source type.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

getDisplayField

String getDisplayField()
                       throws IOException,
                              AutomationException
Primary display field.

Description

The name of the layer's primary display field.

Remarks

Usually this field name contains the string "name", or is the first string field found in the layer's attributes. This field is used to show map tips for the layer. The value of this property must match the name of one of the fields in the layer's FeatureClass.

Note, if a display expression is set, this method will return a nullstring if queried and fail if you try to set a value. See IDisplayExpressionProp for more information.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

setDisplayField

void setDisplayField(String fieldName)
                     throws IOException,
                            AutomationException
Primary display field.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

isSelectable

boolean isSelectable()
                     throws IOException,
                            AutomationException
Indicates if layer is selectable.

Description

Indicates whether the layer's features are selectable.

Remarks

The default value for Selectable is False.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

setSelectable

void setSelectable(boolean value)
                   throws IOException,
                          AutomationException
Indicates if layer is selectable.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

search

IFeatureCursor search(IQueryFilter queryFilter,
                      boolean recycling)
                      throws IOException,
                             AutomationException
Creates a cursor based upon the search criteria.

Description

Use this method to return a read-only cursor of the layer's features.

Remarks

If there is a definition query set on the layer, the Search method will automatically work on the subset of features in the layer that meet the definition criteria. You specify an additional query that will be applied after the layer's definition query by passing valid IQueryFilter object for the QueryFilter parameter.

This Search method will not work on joined fields. If the FeaureLayer has any joins, you should use the IGeoFeatureLayer::SeachDisplayFeatures method instead.

You cannot use the cursor returned by IFeatureLayer::Search to update features, instead use IFeatureClass::Update.

Recycling specifies whether the resulting feature cursor will be recycling or non-recycling. Use True for recycling cursor and False for a non-recycling cursor. See the topic for IFeatureClass::Search for more information.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Parameters:
queryFilter - A reference to a com.esri.arcgis.geodatabase.IQueryFilter (in)
recycling - The recycling (in)
Returns:
A reference to a com.esri.arcgis.geodatabase.IFeatureCursor
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

isScaleSymbols

boolean isScaleSymbols()
                       throws IOException,
                              AutomationException
Indicates if symbols are scaled for the layer.

Description

Indicates whether the symbols for this layer will respect the reference scale of the map containing the layer. Set this property to True for your layer and set a map reference scale to have your layer symbology scale as you zoom in and out.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

setScaleSymbols

void setScaleSymbols(boolean scale)
                     throws IOException,
                            AutomationException
Indicates if symbols are scaled for the layer.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

getShapeType

int getShapeType()
                 throws IOException,
                        AutomationException
The layer's shape type.

Remarks

Returns the basic geometry type of the layer's underlying feature class. See IFeatureClass::ShapeType for more information.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Returns:
A com.esri.arcgis.geometry.esriGeometryType constant
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

expandRegionForSymbols

void expandRegionForSymbols(IDisplay display,
                            IGeometry region)
                            throws IOException,
                                   AutomationException
Expands the given geometry by an amount that will include the layer's symbology for the given display.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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