ArcGISMapImageLayer

Displays data from an ArcGIS Map service by using dynamically generated map images. Functional characteristics Map images are created and returned by the server on every request, so they always show the latest data at the time of the request. Characteristics of the image, such as ImageAdjustmentLayer.brightness, ImageAdjustmentLayer.contrast, ImageAdjustmentLayer.gamma, and Layer.opacity can be specified. By obtaining the associated sub-layers of the ArcGISMapImageLayer using the ArcGISMapImageLayer.mapImageSublayers property, you can control if each sub-layer is ArcGISSublayer.isVisible and filter the data via the ArcGISSublayer.definitionExpression. Also, the Layer.spatialReference can be changed from the service's default and the service will reproject each image on the fly.

The underlying ServiceFeatureTable, for each map image sub-layer or for non-spatial tables used in the service, can be accessed via the ArcGISMapImageLayer.tables property. These tables can be queried using any valid combination of attribute, spatial, and temporal criteria via the numerous query methods. You can also query for FeatureTable.queryStatistics(StatisticsQueryParameters) to see summary statistics or to find related features in other tables via the numerous query methods.

If you want the background color for the map image to be transparent, make sure the ArcGISMapImageLayer.imageFormat is set to PNG.

Performance characteristic The map service creates map images on the fly. Rendering time depends on the amount and complexity of the data in the map. This will typically be slower than fetching the equivalent map as prerendered (or cached) tiles via an ArcGISTiledLayer. Because the server renders the map, map image layers require less processing time on the client than similar maps rendered locally.

ArcGIS map image layers are good candidates for showing features that change periodically, or that require filtering by the user. Although rendering occurs on the server, the client has access to service feature tables for all sublayers (as well as non-spatial tables and relationships).

Since

200.1.0

See also

Constructors

Link copied to clipboard

Creates a map image layer object from an item.

Link copied to clipboard

Creates a map image layer object. If the specified URI is a portal item URL (see PortalItem.PortalItem(String) for the supported URL formats), the underlying PortalItem will be created and accessible through Layer.item.

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard

The geodatabase version of the map image layer.

Link copied to clipboard

The image format of the map image layer. If set to MapServiceImageFormat.Default, the default image format is defined by the service.

Link copied to clipboard

The sublayers of a map image layer. The collection is specific to a layer so you can't reuse a sublayer collection coming from another ArcGISMapImageLayer or ArcGISSublayer. You have to create a new layer collection by using MutableListImpl.MutableListImpl(CoreElementType).

Link copied to clipboard

The map service information.

Link copied to clipboard

A list of tables in the map image layer. The collection is specific to this map image layer. Tables are not loaded by default. Tables are loaded internally when asynchronous operations like query are performed. Alternatively, they can be loaded by calling FeatureTable.load().

Link copied to clipboard
val url: String?

The URI of the map service. This method can't be called once the layer is loading else ErrorType.CommonIllegalState exception will occur.

Inherited properties

Link copied to clipboard

The attribution text for the layer.

Link copied to clipboard

The brightness of the layer.

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

The contrast of 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
open override val fullTimeExtent: StateFlow<TimeExtent?>

The full time extent of the object. A null if the object is not time aware or if an error occurs.

Link copied to clipboard

The gamma of the layer.

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
open override var isTimeFilteringEnabled: Boolean

A flag indicating whether the object must use the time extent defined on the owning GeoView to filter its data.

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
val item: Item?

The item the layer has been created from.

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

The load status.

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
open override var refreshInterval: Long?

The objects refresh interval. The refresh interval, in milliseconds. A refresh interval of null means never refresh.

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

The spatial reference of the layer.

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

The sub layer contents of a layer content.

Link copied to clipboard
open override val supportsTimeFiltering: Boolean

A flag indicating whether the object supports filtering its contents by time values with the extent set on the owning GeoView.

Link copied to clipboard
open override val timeInterval: TimeValue?

The suggested time slider step size for this time aware object. Can be null if no time interval is suggested for this time aware object.

Link copied to clipboard
open override var timeOffset: TimeValue?

The time offset applied to this object. The offset is subtracted from the time extent set on the owning GeoView. This allows for data from different periods of time to be compared.

Link copied to clipboard
val visibilityChanged: SharedFlow<Boolean>

Callback invoked when the visibility of the layer changes.

Functions

Link copied to clipboard
open override fun clone(): ArcGISMapImageLayer
Link copied to clipboard

Loads all of the map service's sublayers and non spatial tables.

Link copied to clipboard

Resets the sublayers of a map image layer to the default values defined by the service. After this call, any changes to the sublayers (either by using an ArcGISMapImageSublayer setter or by changing the sublayer collections) are lost. The sublayer hierarchy returns to its initial state (defined by the service) and image requests to display the layer will no longer use the dynamic layer capabilities of the service.

Inherited functions

Link copied to clipboard
open override fun cancelLoad()

Cancels loading metadata for the Loadable object.

Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
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 hashCode(): Int
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.