A layer that can visualize vector/feature data.
public class FeatureLayer : Layer, INotifyPropertyChanged, ILoadable, ILayerContent, IPopupSource, ITimeAware, IFloorAware
Feature layers displays feature data from the online sources: ServiceFeatureTable, OgcFeatureCollectionTable, and WfsFeatureTable and from the offline sources: GeodatabaseFeatureTable,ShapefileFeatureTable, and GeoPackageFeatureTable. Feature layers can be used to display, select, and query features in a layer. If the underlying feature service or table supports editing, you can use it with a feature layer as a basis for editing geometry, attributes, and attachments. Feature layers can also be used to store features associated with a utility network.
Features are retrieved as needed by the app. Features can be downloaded from a sync-enabled feature service when the device is connected and cached locally for use when the device is offline. Edits can then be synchronized back to the service.
The following are sources that can be rendered using a feature layer.
Feature service - Backed by a service feature table; feature data from the service is cached locally in the table. New features are retrieved automatically when you navigate the map. The local table cache is discarded when the layer is disposed. If sync is enabled, features can be created, edited, and pushed to the server.
Geodatabase — Backed by a geodatabase feature table; The geodatabase can be a replica of a feature service, which allows synchronizing with a feature service, or taking the content of a feature service offline. Use a geodatabase sync task to synchronize the geodatabase with the service. The geodatabase can also be a mobile geodatabase created by ArcGIS Pro. Mobile geodatabases cannot be synced and use a default renderer.
Shapefile — Backed by a shapefile feature table; use a feature layer to show the contents of shapefiles (.shp).
Geopackage — Backed by a geopackage feature table; use a feature layer to render the tables in a GeoPackage (.gpkg). A GeoPackage is a data source that conforms to the OGC GeoPackage specification. Geopackage feature tables can be edited and saved, but can't support sync, because there is no backing feature service. ArcGIS Runtime supports GeoPackage versions 1.0, 1.1, and 1.2.
Web Feature Service (WFS) — Backed by a WFS feature table. You can populate the table using Runtime query parameters or raw XML-encoded GetFeature queries. A WFS feature table only supports manual cache feature request mode. Runtime supports OGC WFS versions 2.0.0 and 2.0.2.
WFS server implementations are inconsistent in how they expect coordinates to be formatted. Some return and expect coordinates in (x, y) order, while others expect(y, x). Runtime guesses the correct order by default. This behavior can be configured with the AxisOrder and FilterAxisOrder properties.
OGC API Features - Backed by an OGC feature collection table. You can populate the table using Runtime query parameters. An OCG feature collection table only supports manual cache feature request mode. Runtime supports OGC API - Features - Part 1 and OGC API - Features - Part 2.
Individual features can be queried and filtered based on spatial queries or SQL queries. Starting with release 100.3.0, ArcGIS Runtime uses case-insensitive string comparison when querying a ShapefileFeatureTable.
The features displayed in a FeatureLayer are re-projected to match the SpatialReference, if necessary. Local tables cannot be re-projected automatically.
Feature layers expose a UnsupportedJson property that, for feature layers based on a feature service, returns a dictionary of values known to the supported web map specification but not explicitly exposed through the Runtime API. This allows you to access information that was saved with the layer but not used b Runtime. Feature layers also provide a UnknownJson property to return JSON that was not recognized.
As full feature information is cached locally in a geodatabase, shapefile, or GeoPackage, and features are drawn natively, this layer type offers excellent display performance when zooming and panning the map within the extent of cached features. Querying features is also efficient, enabling app functions such as real-time updates of query results in a map.
The local cache must be initially created, which can be resource-intensive for the server. The initial download to the device may require extensive network usage and subsequent local device storage. App memory increases with the number and complexity of the features cached. Network usage can be eliminated by provisioning the cache directly to the device in advance.
Feature tables backed by a service define three feature request modes. The table's feature request mode controls how and when features are requested from the service.
On interaction cache — Features are requested automatically for the visible map or scene extent. As the user pans and zooms, features are cached locally. If the user returns to an area where features have already been loaded, the table won't need to download those features again.
Manual cache — Features must be manually populated using a call to the PopulateFromServiceAsync(QueryParameters, Boolean, IEnumerable<String>) method. Once populated, all queries are made against the local table only. This method can be called again to retrieve more features from the service.
On interaction, no cache—Features are requested automatically for the visible map extent. As the user pans and zooms, features outside the visible extent are not cached and must be downloaded again each time.
Initializes a new instance of the FeatureLayer class.
Initializes a new instance of the FeatureLayer class from a feature layer or feature service portal item.
Gets or sets a SQL expression which limits the features available for query and display on the feature layer.
Gets or sets the value that defines how features are filtered from the display.
Gets or sets the FeatureTable associated with this layer.
Gets or sets the properties that allow a feature layer to be floor-aware.
Gets the temporal window that encapsulates the instance's complete set of data
Gets or sets a value indicating whether the PopupDefinition defined is enabled.
Gets or sets a value indicating whether the instance respects any temporal filters that are applied to it.
Gets a modifiable collection of LabelDefinition label definitions for this feature layer.
Gets or sets a value indicating whether labels should be displayed.
Gets or sets the pop-up definition for the FeatureLayer.
Gets or sets the refresh interval on a FeatureLayer.
Gets or sets the renderer used for rendering features on this layer.
Gets or sets a value indicating which rendering mode to use
Gets or sets a value indicating whether the layer's symbols and labels honor the Map reference scale.
Gets or sets the scene properties for the feature layer.
Gets a value indicating whether the instance supports filtering its data based on time.
Gets or sets the feature tiling mode in use by the feature layer. Default is EnabledWhenSupported.
Gets a temporal value that represents the suggested temporal interval to use when sequentially stepping through the instance's data by time
Gets or sets the amount of time by which to offset the temporal values of data points in this instance when displaying the data in a GeoView
Gets unknown data from the source JSON.
Gets unsupported data from the source JSON.
Clears all selected features.
Returns a list of the currently selected features.
Resets the layer's features visibility back to factory defaults.
Resets the renderer to the factory default.
Selects the given feature and adds it to the current list of selected features.
Selects the features in the list and adds them to the current list of selected features.
|SelectFeaturesAsync(QueryParameters, SelectionMode, CancellationToken)|
Sets the visibility of the given features.
Sets the visibility of the given feature.
Unselects the given feature and removes it from the current list of selected features.
Unselects the features in the given list and removes them from the current list of selected features.
Raised when the FullTimeExtent of the instance's data changes
|.NET Standard 2.0||100.3 - 100.15|
|.NET 6.0||100.13 - 100.15|
|.NET 6.0 Windows||100.13 - 100.15|
|.NET Framework||100.0 - 100.15|
|.NET 5||100.10 - 100.12|
|.NET Core 3.1||100.7 - 100.12|
|Xamarin.Android||100.0 - 100.15|
|Xamarin.iOS||100.0 - 100.15|
|UWP||100.0 - 100.15|