Superseded By

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 has properties that specify the feature class of the layer, the data source type, the primary display field, whether or not layer symbols scale based on the map's reference scale, and whether or not the layer is selectable.

There is also a method Search for performing a search on the layer. This method returns a cursor of features from the layer that meet a given search criteria. If there is a definition query set on the layer, Search will work on the subset of the features in the layer that meet the definition criteria. However, the Search method will not work on joined fields. If the feature layer has any joins, use the IGeoFeatureLayer::SearchDisplayFeatures method instead.

IGeoFeatureLayer provides access to all properties and methods of IFeatureLayer plus additional properties to access a layer's feature renderer and labeling properties. Fewer layer types support IGeoFeatureLayer compared to IFeatureLayer.

getDataSourceType

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:

getDisplayField

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.

search

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 FeatureLayer has any joins, you should use the IGeoFeatureLayer::SearchDisplayFeatures 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.

isScaleSymbols

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.