The MediaLayer is used to add image and video elements to the map at a specified geographic location. This layer can be used to display old scanned maps, weather data, satellite imagery, aerial and drone images, fantasy images and video feedback, etc. The geographic location of the image or video can be set using the extent and rotation, corner points or control points.

See https://developers.arcgis.com/web-map-specification/objects/mediaLayer/ https://developers.arcgis.com/web-scene-specification/objects/mediaLayer/.

interface MediaLayerJson {
    blendMode?:
        | "invert"
        | "normal"
        | "lighter"
        | "multiply"
        | "color"
        | "average"
        | "color-burn"
        | "color-dodge"
        | "darken"
        | "destination-atop"
        | "destination-in"
        | "destination-out"
        | "destination-over"
        | "difference"
        | "exclusion"
        | "hard-light"
        | "hue"
        | "lighten"
        | "luminosity"
        | "minus"
        | "overlay"
        | "plus"
        | "reflect"
        | "saturation"
        | "screen"
        | "soft-light"
        | "source-atop"
        | "source-in"
        | "source-out"
        | "vivid-light"
        | "xor";
    effect?: EffectJson;
    georeference?: GeoreferenceJson;
    id?: string;
    itemId?: string;
    layerType: "MediaLayer";
    listMode?: LayerListMode;
    maxScale?: number;
    mediaType?: "image" | "video";
    minScale?: number;
    opacity?: number;
    refreshInterval?: number;
    showLegend?: boolean;
    title?: string;
    type?: LegacyOperationalLayerJsonType | LegacyBasemapLayerJsonType;
    url?: string;
    visibility?: boolean;
    visibilityTimeExtent?: [number, number];
}

Hierarchy (view full)

Properties

blendMode?:
    | "invert"
    | "normal"
    | "lighter"
    | "multiply"
    | "color"
    | "average"
    | "color-burn"
    | "color-dodge"
    | "darken"
    | "destination-atop"
    | "destination-in"
    | "destination-out"
    | "destination-over"
    | "difference"
    | "exclusion"
    | "hard-light"
    | "hue"
    | "lighten"
    | "luminosity"
    | "minus"
    | "overlay"
    | "plus"
    | "reflect"
    | "saturation"
    | "screen"
    | "soft-light"
    | "source-atop"
    | "source-in"
    | "source-out"
    | "vivid-light"
    | "xor"

Blend modes are used to blend layers together to create an interesting effect in a layer, or even to produce what seems like a new layer.

effect?: EffectJson

Effect provides various filter functions to achieve different visual effects similar to how image filters (photo apps) work.

georeference?: GeoreferenceJson

Attribution to the Web Tile Layer provider. It is displayed in the attribution on the web map. Input required by the user when the layer is added to the web map.

id?: string

A unique identifying string for the layer.

itemId?: string

Optional string containing the item ID of the Media Layer item registered on ArcGIS Online or your organization's portal.

layerType

The type of layer.

listMode?: LayerListMode

Indicates how the layer should display in the table of contents. The known values are listed below. See support/esri!ListMode.

maxScale?: number

A number representing the maximum scale at which the layer will be visible. The number is the scale's denominator; thus, a value of 2400 represents a scale of 1/2,400. A value of 0 indicates that the layer will be visible no matter how far you zoom in.

mediaType?: "image" | "video"

Indicates the type of media that the url points to. The currently supported media types are image and video. Images must be in JPEG or PNG format. For supported video formats, please refer to the MDN video codec guide. 'mediaType' is applicable only when the url is defined.

minScale?: number

A number representing the minimum scale at which the layer will be visible. The number is the scale's denominator; thus, a value of 2400 represents a scale of 1/2,400.

opacity?: number

The degree of transparency applied to the layer on the client side, where 0 is full transparency and 1 is no transparency.

refreshInterval?: number

When the refresh interval is set on a layer, the client must refresh that layer only, not the entire web map. The default value is '0', meaning the no refresh. You can enable a refresh interval on the following types of layers: ArcGIS Server web service, hosted feature layer, hosted tile layer, OGC WMS, OGS WMTS, tile layer, GeoRSS, Living Atlas layers, basemaps (including Bing Maps basemaps), CSV from the web with latitude and longitude fields, and KML when added to ArcGIS Online through the My Content page. See https://doc.arcgis.com/en/arcgis-online/create-maps/set-refresh-interval.htm.

showLegend?: boolean

Indicates whether to allow map authors the ability to control what layers should be shown in a client's legend.

title?: string

A user-friendly title for the layer that can be used in a table of contents. If this is not included, then a title is derived from the service.

(Deprecated, use layerType instead.) If the layer is referenced through a URL, but is not an ArcGIS web service, then this parameter can be supplied to denote the layer type.

url?: string

Url URL to the media file. It is not applicable when itemId is defined. The url is relative when the media file is stored as an item resource. Relative urls are only applicable for image media types. Video media types only support external video urls at this time. See related mediaType property.

visibility?: boolean

Determines whether the layer is initially visible in the web map.

visibilityTimeExtent?: [number, number]

Represents time extent that will control when a layer should be visible based on webmap's current time. Visibility time extent only affects the layer visibility and will not filter the data.