Show / Hide Table of Contents

Class Layer

This is the base class for all layer types that can be added to the Map document.

Inheritance
Object
Layer
AnnotationLayer
ArcGISSceneLayer
ArcGISVectorTiledLayer
DimensionLayer
FeatureCollectionLayer
FeatureLayer
GroupLayer
ImageAdjustmentLayer
IntegratedMeshLayer
KmlLayer
MobileBasemapLayer
OpenStreetMapLayer
PointCloudLayer
EncLayer
Implements
INotifyPropertyChanged
ILoadable
ILayerContent
Object.Equals(Object)
Object.Equals(Object, Object)
Object.GetHashCode()
Object.GetType()
Object.MemberwiseClone()
Object.ReferenceEquals(Object, Object)
Object.ToString()
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

TargetVersions
.NET Standard 2.0100.3 - 200.0
.NET 6.0100.13 - 200.0
.NET 6.0 Windows100.13 - 200.0
.NET 6.0 Android200
.NET 6.0 iOS200
.NET Framework100.0 - 200.0
.NET 5100.10 - 100.12
.NET Core 3.1100.7 - 100.12
Android100.0 - 100.15
iOS100.0 - 100.15
UWP100.0 - 200.0

Relevant samples

Add an integrated mesh layer: View an integrated mesh layer from a scene service.
Add ENC exchange set: Display nautical charts per the ENC specification.
Add features: Add features to a feature layer.
Analyze hotspots: Use a geoprocessing service and a set of features to identify statistically significant hot spots and cold spots.
In This Article
Back to top Copyright © 2022 Esri.