ArcObjects Library Reference (Carto)  

IFeatureLayer Interface

Provides access to members that control common aspects of a feature layer. Note: the IFeatureLayer interface has been superseded byIFeatureLayer2. Please consider using the more recent version.

Product Availability

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

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.

Members

Description
Read-only property AreaOfInterest The default area of interest for the layer.
Read/write property Cached Indicates if the layer needs its own display cache.
Read/write property DataSourceType Data source type.
Read/write property DisplayField Primary display field.
Method Draw Draws the layer to the specified display for the given draw phase.
Read/write property FeatureClass The layer's feature class.
Read/write property MaximumScale Maximum scale (representative fraction) at which the layer will display.
Read/write property MinimumScale Minimum scale (representative fraction) at which the layer will display.
Read/write property Name Layer name.
Read/write property ScaleSymbols Indicates if symbols are scaled for the layer.
Method Search Creates a cursor based upon the search criteria.
Read/write property Selectable Indicates if layer is selectable.
Read/write property ShowTips Indicates if the layer shows map tips.
Write-only property SpatialReference Spatial reference for the layer.
Read-only property SupportedDrawPhases Supported draw phases.
Read-only property TipText Map tip text at the specified location.
Read-only property Valid Indicates if the layer is currently valid.
Read/write property Visible Indicates if the layer is currently visible.

Inherited Interfaces

Interfaces Description
ILayer Provides access to members that work with all layers.

CoClasses that implement IFeatureLayer

CoClasses and Classes Description
CadAnnotationLayer An ESRI Cad annotation layer.
CadastralFabricSubLayer Cadastral Fabric Feature Layer Object.
CadFeatureLayer ESRI CAD Feature Layer class.
CoverageAnnotationLayer An ESRI coverage annotation layer.
DimensionLayer A collection of properties for a dimension layer.
FDOGraphicsLayer A collection of properties for an annotation layer (feature data object graphics layer).
FeatureLayer A collection of features and their visual representation.
GdbRasterCatalogLayer Geodabase RasterCatalog source and display options.
ImageServerLayer Image server layer source and display options.
IMSSubFeatureLayer A collection of IMS features as a sublayer of an IMSMapLayer.
MADtedLayer (esriDefenseSolutions) A layer used to control the display of MA DTED Catalogs.
MARasterLayer (esriDefenseSolutions) A layer used to control the display of MA RPF Catalogs.
TemporalFeatureLayer (esriTrackingAnalyst) Defines the coclass IDL parameters and attributes of the TemporalFeatureLayer COM object.

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.

See Also

ILayer Interface

.NET Snippets

Zoom to Selected Globe Features | Add Hotlink | Get FeatureClass of Selected Feature Layer in Contents View | Add Hyperlink | Get Selected Feature Layer in Contents View | Get FeatureLayer from Layer Index Number | Create Animation from Path | Clear Selected Map Features | Add Shapefile Using OpenFileDialog | Add Tracking Layer To Map | Set Data Source | Select Map Features by Attribute Query |

.NET Samples

3D dynamic element tracking (Code Files: TrackDynamicObject) | Add a custom menu created in .NET to ArcGIS Desktop (Code Files: AddShapefile) | Add a traversal result to the map (Code Files: AddTraversalResultsToMap) | Adding a real-time feed to ArcMap (Code Files: AddTrackingServerLayerButton) | Applying a time offset to a time-aware feature layer (Code Files: TimeOffsetButton) | ArcGIS GPConsole (Code Files: Program) | Automate ArcGIS Desktop applications (Code Files: Form1) | Buffer snap agent (Code Files: BufferSnap EditingForm) | Change layer rendering using the SymbologyControl (Code Files: LayerRendering) | Closest facility application using the NAServer extension in ArcGIS Server via a GIS server (Code Files: ClosestFacility_GISServerAPIClass) | Create a custom selection extension by extending ArcObjects (Code Files: SelectionExtension SelectionTargetComboBox) | Create a geoprocessing tool to buffer a layer and retrieve messages (Code Files: BufferDlg) | Create camera flyby from path (Code Files: frmCameraPath) | Custom reshape polyline edit task (Code Files: EditingForm ReshapePolylineEditTask) | Custom scene navigation commands (Code Files: SelectFeatures) | Custom selection extension (Code Files: SelectionExtension SelectionTargetComboBox) | Custom upstream trace task (Code Files: CustomUpstreamTraceTaskVBNet) | Custom vertex editing commands (Code Files: EditingForm) | Cut polygons without selection edit task (Code Files: EditingForm) | Displaying a TOCControl context menu (Code Files: LayerSelectable) | Displaying MapTips in the MapControl (Code Files: MapTips) | Edit event listener (Code Files: EditingForm) | Editing using a custom form (Code Files: EditorForm MainForm) | Executing geoprocessing tools in the background (Code Files: RunGPForm) | Implementing a property page for an ArcGIS Engine application (Code Files: FeatureLayerSymbology PropertySheet SymbolSelectorPropPage) | Make a custom time slider (Code Files: CustomTimeSliderButton) | Managing snap agents (Code Files: EditingForm) | Network Analyst Engine application (Code Files: frmLoadLocations frmMain) | Points along line construction tool (Code Files: PointsAlongLineForm) | Retrieve a color ramp from the SymbologyControl (Code Files: SymbolForm) | Route application using the NAServer extension in ArcGIS Server via a GIS server (Code Files: Route_GISServerAPIClass) | Server spatial query COM utility (Code Files: VegTool_VBNet) | Server spatial query server object extension (Code Files: Configurator Extension PropertyForm) | Service area application using the NAServer extension in ArcGIS Server via a GIS server (Code Files: ServiceArea_GISServerAPIClass) | Set the time extents for a layer then render the layer (Code Files: SetTimeExtentsButton) | Simple point plug-in data source (Code Files: OpenSimplePointDlg) | Tabbed feature inspector (Code Files: AttachTabbedInspectorExtensionCommand EngineApplication) | Time Series Graph tool add-in (Code Files: TimeSeriesGraph) | Using the traversal result to select source features (Code Files: SelectFeaturesTool) | ViperPin tool (Code Files: ViperPinForm) |

.NET Related Topics

3DAnalyst | Add-in coding patterns | Adding a custom menu created in .NET to ArcGIS Desktop | Adding a plug-in data source programmatically | Adjusting feature locations with spatial adjustment | Automating the ArcGIS Desktop applications | Creating and working with basemap layers | Creating annotation and dimension feature classes | GeoData services | How to access a layer's underlying data | How to add different types of layers to a map | How to animate the camera along a path (line feature) in globe | How to connect to ArcGIS Tracking Server | How to create a selection set using a scatter plot graph | How to create an edit session | How to create graph series with different color types | How to create SOE property pages | How to develop the SOE | How to get CAD transformation properties (from, to, angle, and scale) | How to get the points of a two-point CAD transformation | How to return CAD drawing layer properties | How to return CAD transformation settings | How to set CAD transformation properties (from, to, angle, and scale) | How to set the points of a two-point CAD transformation | How to zoom to selected features in globe | Location | Managing application state | Map services | Performing map selection | Programming with server objects | Releasing COM references | Server object extensions (SOE) | Using feature templates | Utility COM objects |