Layer

sealed class Layer : LayerContent, Loadable

A base class for all layers. Layer is the base class for all layer types. A layer is a representation of geographic data portrayed using symbols and text labels. Multiple layers can be 'stacked' to enhance the information displayed. Layers are displayed in an ArcGISMap inside a MapView control. Layers are drawn bottom-to-top, so the first layer in a map's layer collection is drawn first (on the bottom) and each subsequent layer is drawn on top of it.

Layer type 2D/3D Time-aware Online/offline Sources
Annotation layer ([AnnotationLayer]) 2D No Both ArcGIS feature service, portal item, mobile map package (.mmpk)
ArcGIS map image layer ([ArcGISMapImageLayer]) Both Yes Online ArcGIS map service
ArcGIS scene layer ([ArcGISSceneLayer]) 3D No Both Scene service or scene package
ArcGIS tiled layer ([ArcGISTiledLayer]) Both No Both ArcGIS tile service, tile package (.tpk/.tpkx)
ArcGIS vector tiled layer ([ArcGISVectorTiledLayer]) 2D No Both ArcGIS vector tile service, vector tile package (.vtpk)
Bing maps layer ([BingMapsLayer]) Both No Online Bing maps
Dimension layer ([DimensionLayer]) 2D Yes Offline Mobile map package (.mmpk)
Dynamic entity layer ([DynamicEntityLayer]) Both No Online ArcGIS stream service
ENC layer ([EncLayer]) 2D No Offline ENC exchange set, ENC cell
Feature collection layer ([FeatureCollectionLayer]) Both No Both Portal item, web map, feature set / query result
Feature layer ([FeatureLayer]) Both Yes Both ArcGIS feature service, WFS, shapefile, GeoPackage, geodatabase, OGC API Features
Group layer ([GroupLayer]) Both No Both Other layers and group layers
KML layer ([KmlLayer]) Both Yes Both KML file (.kml, .kmz)
Integrated mesh layer ([IntegratedMeshLayer]) 3D No Both Scene layer package (.slpk)
Mobile basemap layer ([MobileBasemapLayer]) 2D No Offline Mobile map package (.mmpk)
OpenStreetMap layer ([OpenStreetMapLayer]) Both No Online OpenStreetMap.org
Point cloud layer ([PointCloudLayer]) 3D No Both Portal item, scene layer package (.slpk)
Raster layer ([RasterLayer]) Both Yes Both GeoPackage, raster file, ArcGIS Image service
Subtype feature layer ([SubtypeFeatureLayer]) 2D No Both ArcGIS feature service, geodatabase
Web tiled layer ([WebTiledLayer]) Both No Online Web tile service
WMS layer ([WmsLayer]) Both Yes Online WMS service
WMTS layer ([WmtsLayer]) Both No Online WMTS service

Since

200.1.0

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard

The attribution text for the layer.

Link copied to clipboard

The description for the layer. The description of the layer.

Link copied to clipboard

The full extent of this layer, which is the extent where all layer data is contained. You can use this to zoom to all of the data contained in this layer. For feature layers, the extent is retrieved from the tables extent.

Link copied to clipboard
var id: String

The unique identifying string for the layer, for example specified in a map or scene. The id is used by other parts of this API to refer to a specific Layer, such as in a set of FeatureFenceParameters or a FacilityLayerDefinition. If not supplied, all layers will be assigned a unique id when created.

Link copied to clipboard

Whether the layer supports identify. If the layer is not loaded it may return false if identify support is determined by metadata that is not yet available.

Link copied to clipboard
val item: Item?

The item the layer has been created from.

Link copied to clipboard

The maximum scale for the layer. This controls the maximum scale level the layer can zoom to. All of the connected map views will be updated.

Link copied to clipboard

The minimum scale for the layer. This controls the minimum scale level the layer can zoom to. All of the connected map views will be updated.

Link copied to clipboard
open override var name: String

The name of this layer.

Link copied to clipboard

The opacity for the layer. All of the connected map views will be updated.

Link copied to clipboard

The spatial reference of the layer.

Link copied to clipboard
val visibilityChanged: SharedFlow<Boolean>

Callback invoked when the visibility of the layer changes.

Inherited properties

Link copied to clipboard
open override val canChangeVisibility: Boolean

A flag indicating whether the layer content's visibility can be changed. A flag indicating whether the layer content visibility can be changed. Will return false if an error occurs.

Link copied to clipboard
open override var isVisible: Boolean

The layer content's visibility. The layer content visibility. Will return false if an error occurs.

Link copied to clipboard
open override val loadStatus: StateFlow<LoadStatus>

The load status.

Link copied to clipboard
open override var showInLegend: Boolean

A flag indicating whether the layer content participates in the legend. A flag indicating whether the layer content is shown in the legend.

Link copied to clipboard
open override val subLayerContents: StateFlow<List<LayerContent>>

The sub layer contents of a layer content.

Functions

Link copied to clipboard
abstract fun clone(): Layer

Clones the Layer.

Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
Link copied to clipboard
open override fun hashCode(): Int

Inherited functions

Link copied to clipboard
open override fun cancelLoad()

Cancels loading metadata for the Loadable object.

Link copied to clipboard
open suspend override fun fetchLegendInfos(): Result<List<LegendInfo>>

Fetches the list of legend info.

Link copied to clipboard
open override fun isVisibleAtScale(scale: Double): Boolean

Returns the layer content's effective visibility at the specified scale. Returns the effective layer content visibility. This effective visibility takes care of the effective visibility of the parents at the specified scale. Will return false if an error occurs.

Link copied to clipboard
open suspend override fun load(): Result<Unit>

Loads the metadata for the object.

Link copied to clipboard
open suspend override fun retryLoad(): Result<Unit>

Loads or retries loading metadata for the object.

Inheritors

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard