Class Layer
This is the base class for all layer types that can be added to the Map document.
Inheritance
Namespace: Esri.ArcGISRuntime.Mapping
Assembly: Esri.ArcGISRuntime.dll
Syntax
public abstract class Layer : INotifyPropertyChanged, ILoadable, ILayerContent
Remarks
A Layer is a representation of geographic data portrayed using symbols and text labels. Multiple layers can be 'stacked' on top of each other to enhance the information displayed for making meaningful decisions. Layers are displayed visually in the Map Control. Layers are drawn bottom to top so the first one in the LayerCollection is drawn first (on the bottom) and each subsequent layer is drawn on top of it, in the order listed.
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 | 2D | No | Both | ArcGIS vector tile service, vector tile package (.vtpk) |
BingMapsLayer | Both | No | Online | Bing maps |
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) |
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 an identifier for the layer |
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 - 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 |