Layer
A base class for classes that represent layers. 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 com.arcgismaps.mapping.ArcGISMap or com.arcgismaps.mapping.ArcGISScene can display these layers inside a com.arcgismaps.mapping.view.MapView or com.arcgismaps.mapping.view.SceneView, respectively. To enhance the displayed information, you can 'stack' the layers into a collection of com.arcgismaps.mapping.ArcGISMap.operationalLayers or com.arcgismaps.mapping.ArcGISScene.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 these different types of layers:
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]) | Both | 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) |
OGC 3D Tiles layer ([Ogc3DTilesLayer]) | 3D | No | Both | Portal item, tileset, tile package(.3tz) |
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
Inheritors
Properties
The attribution text for the layer.
The description for the layer.
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 its com.arcgismaps.data.FeatureTable.extent.
The unique identifying string for the layer, as 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 com.arcgismaps.geotriggers.FeatureFenceParameters or a com.arcgismaps.mapping.floor.FacilityLayerDefinition. If not supplied, all layers will be assigned a unique id when created.
True if the layer supports identify, false otherwise. The value of this property may not be correct until the layer is in a fully loaded state.
The maximum scale for the layer. The maximum scale at which this layer is visible. If the map or scene is zoomed in beyond this scale, the layer will not be visible. A value of 0 means there is no maximum scale threshold and the layer will be visible at the smallest scale available for the map or scene. If the value is nil, there is no maximum scale. All of the connected map and scene views will be updated.
The minimum scale for the layer. The minimum scale at which this layer is visible. If the map or scene is zoomed out beyond this scale, the layer will not be visible. A value of 0 means there is no minimum scale threshold and the layer will be visible at the largest scale available for the map or scene. If the value is nil, there is no minimum scale. All of the connected map and scene views will be updated.
The spatial reference of the layer.
A SharedFlow that emits when the visibility of the layer changes.
Inherited properties
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.
The load status.
A flag indicating whether the layer content participates in the legend. A flag indicating whether the layer content is shown in the legend.
The sub layer contents of a layer content.
Functions
Inherited functions
Cancels loading metadata for the Loadable object.
Fetches the list of legend info.
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.