Class Layer
A base class for classes that represent layers.
Inheritance
Namespace: Esri.ArcGISRuntime.Mapping
Assembly: Esri.ArcGISRuntime.dll
Syntax
public abstract class Layer : INotifyPropertyChanged, ILoadable, ILayerContent
Remarks
A layer, also known as an operational layer, provides access to geographic data that is displayed in a map or scene. Each layer references a file or service data source that contains either vector data (points, lines, polygons and attributes) or raster data (images). The Map or Scene can display these layers inside a MapView or SceneView, respectively. To enhance the displayed information, you can 'stack' the layers into a collection of OperationalLayers. The first layer in the collection is drawn first (on the bottom) and each subsequent layer is drawn on top of it.
Layer is the base class for all these layer types:
Layer type | 2D/3D | Time-aware | Online/offline | Sources |
---|---|---|---|---|
AnnotationLayer | 2D | No | Both | ArcGIS feature service, portal item, mobile map package (.mmpk) |
ArcGISMapImageLayer | Both | Yes | Online | ArcGIS map service |
ArcGISSceneLayer | 3D | No | Both | Scene service or scene package |
ArcGISTiledLayer | Both | No | Both | ArcGIS tile service, tile package (.tpk/.tpkx) |
ArcGISVectorTiledLayer | Both | No | Both | ArcGIS vector tile service, vector tile package (.vtpk) |
BingMapsLayer | Both | No | Online | Bing maps |
DimensionLayer | 2D | No | Both | ArcGIS feature service; geodatabase feature table |
DynamicEntityLayer | Both | No | Online | ArcGIS stream service |
EncLayer | 2D | No | Offline | ENC exchange set, ENC cell |
FeatureCollectionLayer | Both | No | Both | Portal item, web map, feature set / query result |
FeatureLayer | Both | Yes | Both | ArcGIS feature service, WFS, shapefile, GeoPackage, geodatabase, OGC API Features |
GroupLayer | Both | No | Both | Other layers and group layers |
KmlLayer | Both | Yes | Both | KML file (.kml, .kmz) |
IntegratedMeshLayer | 3D | No | Both | Scene layer package (.slpk) |
MobileBasemapLayer | 2D | No | Offline | Mobile map package (.mmpk) |
Ogc3DTilesLayer | 3D | No | Both | Portal item, tileset, tile package(.3tz) |
OpenStreetMapLayer | Both | No | Online | OpenStreetMap.org |
PointCloudLayer | 3D | No | Both | Portal item, scene layer package (.slpk) |
RasterLayer | Both | Yes | Both | GeoPackage, raster file, ArcGIS Image service |
SubtypeFeatureLayer | 2D | No | Both | ArcGIS feature service, geodatabase |
WebTiledLayer | Both | No | Online | Web tile service |
WmsLayer | Both | Yes | Online | WMS service |
WmtsLayer | Both | No | Online | WMTS service |
Properties
Name | Description |
---|---|
Attribution | Gets the attribution text for the layer. |
CanChangeVisibility | Gets a value indicating whether the layer content's visibility can be changed. |
Description | Gets the description for the layer. |
FullExtent | Gets the full extent of the layer, which is the extent where all the data in the layer is contained. |
Id | Gets or sets the unique identifying string for the layer, for example specified in a map or scene. |
IsIdentifyEnabled | Gets a value indicating whether the layer supports the identify operation. |
IsVisible | Gets or sets a value indicating whether the layer content is visible. |
Item | Gets the ArcGIS Item |
LoadError | Gets the load error of the layer, if there is one. |
LoadStatus | Gets the load status of the layer. |
MaxScale | Gets or sets the maximum scale where the layer is visible. |
MinScale | Gets or sets the minimum scale where the layer is visible. |
Name | Gets or sets the name of the layer content. |
Opacity | Gets or sets the opacity of the layer. |
ShowInLegend | Gets or sets a value indicating whether the layer content participates in the legend. |
SpatialReference | Gets the spatial reference of the layer. |
SublayerContents | Gets the sub layer contents of a layer content. |
Methods
Name | Description |
---|---|
CancelLoad() | Cancels an ongoing load. |
Clone() | Clones this instance of Layer and its members. |
GetLegendInfosAsync() | Returns an immutable list of LegendInfo. |
IsVisibleAtScale(Double) | Returns the layer content's effective visibility at the specified scale. |
LoadAsync() | Initiates loading of a layer |
OnPropertyChanged(String) | Called when a property changes. |
RetryLoadAsync() | Retry loading the layer. |
Events
Name | Description |
---|---|
Loaded | Occurs when the layer is loaded. |
LoadStatusChanged | Occurs when the layer LoadStatus is changed. |
PropertyChanged | Occurs when a property value changes. |
Applies to
Target | Versions |
---|---|
.NET Standard 2.0 | 100.3 - 200.7 |
.NET | 100.13 - 200.7 |
.NET Windows | 100.13 - 200.7 |
.NET Android | 200.0 - 200.7 |
.NET iOS | 200.0 - 200.7 |
.NET Framework | 100.0 - 200.7 |
Xamarin.Android | 100.0 - 100.15 |
Xamarin.iOS | 100.0 - 100.15 |
UWP | 100.0 - 200.7 |