Hide Table of Contents
esri/dijit/util
esri/layer/pixelFilters
esri/process
esri/support
esri/workers
Class: ArcGISImageServiceLayer

dojo.require("esri.layers.ArcGISImageServiceLayer")

Description

(Added at v1.2)
Allows you to work with an image map service resource exposed by the ArcGIS Server REST API.

Samples

Search for samples that use this class.

Class hierarchy

esri/layers.Layer
|_esri/layers.DynamicMapServiceLayer
  |_esri/layers.ArcGISImageServiceLayer

Constructors

NameSummary
new esri.layers.ArcGISImageServiceLayer(url, options?)Creates a new ArcGISImageServiceLayer object.

Properties

NameTypeSummary
attributionDataUrlStringThe URL, when available, where the layer's attribution data is stored.
bandCountNumberNumber of bands in ArcGISImageServiceLayer.
bandIdsNumber[]Array of current band selections.
bandsObject[]The raster bands that the raster dataset is composed of and their statistics.
classNameStringclass attribute of the layer's node.
compressionQualityNumberCurrent compression quality value.
copyrightTextStringCopyright string as defined by the image service.
credentialCredentialProvides credential information for the layer such as userid and token if the layer represents a resource that is secured with token-based authentication.
defaultMosaicRuleMosaicRuleReturns a MosaicRule object that defines the default mosaic properties published by the image service.
descriptionStringDescription as defined by the image service.
disableClientCachingBooleanWhen true, images are always requested from the server and the browser's cache is ignored.
formatStringThe output image type.
fullExtentExtentFull extent as defined by the map service.
hasAttributionDataBooleanWhen true, the layer has attribution data.
idStringID assigned to the layer.
infoTemplateInfoTemplateThe template that defines the content to display in the map info window when the user clicks on a raster.
initialExtentExtentInitial extent as defined by the map service.
interpolationStringCurrent interpolation method.
loadErrorErrorSet if the layer failed to load.
loadedBooleanWhen the layer is loaded, the value becomes "true", and layer properties can be accessed.
maxImageHeightNumberThe maximum image height, in pixels, that the map service will export.
maxImageWidgthNumberThe maximum image width, in pixels, that the map service will export.
maxRecordCountNumberThe maximum number of results that can be returned from query, identify and find operations.
maxScaleNumberMaximum visible scale for the layer.
minScaleNumberMinimum visible scale for the layer.
mosaicRuleMosaicRuleSpecifies the mosaic rule when defining how individual images should be mosaicked.
opacityNumberOpacity or transparency of layer.
pixelSizeXNumberSize of pixel in X direction.
pixelSizeYNumberSize of pixel in Y direction.
pixelTypeNumberThe pixel type of the image service.
refreshIntervalNumberRefresh interval of the layer in minutes.
renderingRuleRasterFunctionSpecifies the rendering rule for how the requested image should be rendered.
showAttributionBooleanWhen true, the layer's attribution is displayed on the map.
spatialReferenceSpatialReferenceThe spatial reference of the map service.
suspendedBooleanWhen true, the layer is suspended.
timeInfoTimeInfoTemporal information for the layer, such as time extent.
urlStringURL to the ArcGIS Server REST resource that represents a map service.
useMapImageBooleanBy default, images are exported in MIME format, and the image is streamed to the client.
versionNumberThe version of ArcGIS Server the image service is published to, such as 9.3, 9.31, 10, 10.41.
visibleBooleanVisibility of the layer.
visibleAtMapScaleBooleanWhen true, the layer is visible at the current map scale.

Methods

NameReturn typeSummary
attr(name, value)LayerAdds a new attribute or changes the value of an existing attribute on the layer's node.
exportMapImage(imageServiceParameters?, callback?)NoneExports a map using values as specified by ImageServiceParameters.
getAttributionData()DeferredAsynchrously returns custom data for the layer when available.
getDefinitionExpression()StringReturns the current definition expression.
getImageUrl(extent, width, height, callback)StringMethod to implement when extending DynamicMapServiceLayer.
getKeyProperties()DeferredGet key properties of an ImageService including information such as the band names associated with the imagery.
getMap()MapReturns reference to the map control the layer is added to.
getNode()HTMLElementReturns the layer's DOM node.
getRasterAttributeTable()DeferredAsynchronously returns the raster attribute table of an ImageService which returns categorical mapping of pixel values (for example a class, group, category, or membership).
getVisibleRasters()Graphic[]Gets the currently visible rasters.
hide()NoneSets the visibility of the layer to "false".
isVisibleAtScale(scale)BooleanReturns true if the layer is visible at the given scale.
queryVisibleRasters(query, options?, callback?, errback?)NoneReturns the rasters that are visible in the area defined by the geometry (required to be point or polygon) in the query parameter.
refresh()NoneRefreshes the map by making a new request to the server.
resume()NoneResumes layer drawing.
setBandIds(bandIds, doNotRefresh?)NoneSets the R,G,B of the exported image to the appropriate ImageService Band ID.
setCompressionQuality(quality, doNotRefresh?)NoneSets the compression quality of the exported image.
setDefinitionExpression(expression, doNotRefresh)NoneSets the definition expression for the ImageService Layer.
setDisableClientCaching(disable)NoneSets whether images are always requested from the server and the browser's cache is ignored.
setImageFormat(imageFormat, doNotRefresh?)NoneSet the image format.
setInfoTemplate(infoTemplate)NoneSpecify or change the info template for a layer.
setInterpolation(interpolation, doNotRefresh?)NoneSets the interpolation method.
setMaxScale(scale)NoneSet the maximum scale for the layer.
setMinScale(scale)NoneSet the minimum scale for the layer.
setMosaicRule(mosaicRule, doNotRefresh?)NoneSets the mosaic rule of the layer to the specified value.
setOpacity(opacity)NoneSets the opacity of the layer.
setRefreshInterval(interval)LayerChanges the layer's refresh interval to the given value (in minutes).
setRenderingRule(renderingRule, doNotRefresh?)NoneSets the rendering rule of the layer to the given value.
setScaleRange(minScale, maxScale)NoneSet the scale range for the layer.
setUseMapTime(update)NoneDetermine if the layer will update its content based on the map's current time extent.
setVisibility(isVisible)NoneSets the visibility of the layer.
show()NoneSets the visibility of the layer to "true".
suspend()NoneSuspends layer drawing.

Events

[ On Style Events | Connect Style Event ]
All On Style event listeners receive a single event object. Additionally, the event object also contains a 'target' property whose value is the object which fired the event.

Events

NameEvent ObjectSummary
error
{
  error: <Error>
}
Fires when there is a problem retrieving a layer.
load
{
  layer: <Layer>
}
Fires after layer properties for the layer are successfully populated.
map-image-export
{
  mapImage: <MapImage>
}
Fires when the map export is completed.
mosaic-rule-changeFired when the layers mosaic rule is changed.
opacity-change
{
  opacity: <Number>
}
Fires when the layer opacity has been changed, and returns an object with the opacity value.
refresh-interval-changeThis event is fired when the layer's refreshInterval is modified.
rendering-changeFired when the layers band ids are changed or if a raster function is applied.
resumeFires when a layer resumes drawing.
scale-range-changeFires when a layer's minScale and/or maxScale is changed.
scale-visibility-changeFires when a layer's scale visibility changes.
suspendFires when a layer suspends drawing.
updateFires any time a layer has finished loading or updating itself.
update-end
{
  error: <Error>
}
Fires when a layer has finished updating its content.
update-startFires when a layer begins to update its content.
visibility-change
{
  visible: <Boolean>
}
Fires when the layer visibility has been changed, and returns an object with a Boolean visible property containing the new visibility value of the layer.
Constructor Details

new esri.layers.ArcGISImageServiceLayer(url, options?)

Creates a new ArcGISImageServiceLayer object. A URL is a required parameter. This layer also takes some optional parameters. These optional parameters can be included in any order.
Parameters:
<String> url Required URL to the ArcGIS Server REST resource that represents a map service. An example is https://www.example.com/arcgis/rest/services/Portland/Portland_ESRI_LandBase_AGO/MapServer. For more information on constructing a URL, see The Services Directory and the REST API.
<Object> options Optional Optional parameters. See options list.
options properties:
<String> id Optional Id to assign to the layer. If not assigned, esri.Map assigns value.
<ImageServiceParameters> imageServiceParameters Optional The image service parameter options used when exporting an Image Service layer.
<InfoTemplate> infoTemplate Optional The template that defines the content to display in the map info window when the user clicks on a raster.
<Number> opacity Optional Initial opacity or transparency of layer. Values range from 0.0 to 1.0, where 0.0 is 100% transparent and 1.0 has no transparency. The default value is 1.0.
<Object> resourceInfo Optional Specify the metadata of the layer.
<Boolean> useMapImage Optional By default, images are exported in MIME format, and the image is streamed to the client. When useMapImage is set to true, the image is saved to the server, and a JSON formatted response is sent to the client with the URL location of the image. A second call is automatically made to the server to retrieve the image. This methodology is required for secure services that go through a proxy server. In this situation, a map image cannot be streamed.
<Boolean> useMapTime Optional When true, the layer will update its content based on the map's time extent. The default values is true.
<Boolean> visible Optional Initial visibility of the layer. Default is true.
Property Details

<String> attributionDataUrl

The URL, when available, where the layer's attribution data is stored. (Added at v3.1)

<Number> bandCount

Number of bands in ArcGISImageServiceLayer.

<Number[]> bandIds

Array of current band selections.
See also: setBandIds()

<Object[]> bands

The raster bands that the raster dataset is composed of and their statistics. The length of this array gives the number of bands and the array index represents the band ID.
Sample: The array is an object of the form:
 
[
  {
    "min": <Number>,
    "max": <Number>,
    "mean": <Number>,
    "stddev": <Number>
  },
  ...
]

<String> className

class attribute of the layer's node. (Added at v3.7)

<Number> compressionQuality

Current compression quality value. The compression quality controls how much loss the image will be subjected to. Only valid with JPG image types.

<String> copyrightText

Copyright string as defined by the image service.

<Credential> credential

Provides credential information for the layer such as userid and token if the layer represents a resource that is secured with token-based authentication. This value is available after the layer has been loaded i.e. layer.loaded is true. (Added at v2.5)

<MosaicRule> defaultMosaicRule

Returns a MosaicRule object that defines the default mosaic properties published by the image service. (Added at v3.5)

<String> description

Description as defined by the image service.

<Boolean> disableClientCaching

When true, images are always requested from the server and the browser's cache is ignored. This should be used when the data supporting the map service changes frequently.
Known values: true | false
Default value: false

<String> format

The output image type.
Known values: png8 | png24 | jpg | bmp | gif
Default value: png8

<Extent> fullExtent

Full extent as defined by the map service.

<Boolean> hasAttributionData

When true, the layer has attribution data. Use the getAttributionData method to retrieve this data as JSON. (Added at v3.1)
Known values: true | false
Default value: false

<String> id

ID assigned to the layer. If not assigned, esri.Map assigns value. By default, the ID of the layer is "layer" followed by a number. The ID can be user defined only in the layer constructor.
Sample:
  • Setting the layer ID in the layer constructor.
    population = new esri.layers.ArcGISDynamicMapServiceLayer("http://myserver/arcgis/rest/population/MapServer/Layers", {id:"population"});
    
  • Setting the layer ID after a layer is initialized.
    population.id = "population";
  • Retrieving the layer ID.
    function getMapLayers() {
      for (var j=0, jl=myMap.layerIds.length; j<jl; j++) {
        var currentLayer = myMap.getLayer(myMap.layerIds[j]);
        alert("id: " + currentLayer.id);
      }
    }
    

<InfoTemplate> infoTemplate

The template that defines the content to display in the map info window when the user clicks on a raster. (Added at v3.9)

<Extent> initialExtent

Initial extent as defined by the map service.

<String> interpolation

Current interpolation method. The interpolation method affects how the raster dataset is transformed when it undergoes warping or when it changes coordinate space.

<Error> loadError

Set if the layer failed to load. (Added at v3.9)

<Boolean> loaded

When the layer is loaded, the value becomes "true", and layer properties can be accessed. The onLoad event is also fired.
Known values: true | false

<Number> maxImageHeight

The maximum image height, in pixels, that the map service will export. Requires ArcGIS Server version 10.1 or greater. (Added at v2.6)

<Number> maxImageWidgth

The maximum image width, in pixels, that the map service will export. Requires ArcGIS Server version 10.1 or greater. (Added at v2.6)

<Number> maxRecordCount

The maximum number of results that can be returned from query, identify and find operations. Requires ArcGIS Server version 10.1 or greater. (Added at v2.6)

<Number> maxScale

Maximum visible scale for the layer. If the map is zoomed in beyond this scale, the layer will not be visible. A value of 0 means the layer does not have a maximum scale. The default value is 0. (Added at v3.1)

<Number> minScale

Minimum visible scale for the layer. If the map is zoomed out beyond this scale, the layer will not be visible. A value of 0 means the layer does not have a visible scale. The default value is 0. (Added at v3.1)

<MosaicRule> mosaicRule

Specifies the mosaic rule when defining how individual images should be mosaicked.

<Number> opacity

Opacity or transparency of layer. Values range from 0.0 to 1.0, where 0.0 is 100% transparent and 1.0 has no transparency.
Known values: 0.0 - 1.0
Default value: 1.0

<Number> pixelSizeX

Size of pixel in X direction.

<Number> pixelSizeY

Size of pixel in Y direction.

<Number> pixelType

The pixel type of the image service. Pertains to the type of values stored in the raster, such as signed integer, unsigned integer, or floating point. Integers are whole numbers, whereas floating points have decimals.
Known values: C64 | C128 | F32 | F64 | S8 | S16 | S32 | U1 | U2 | U4 | U8 | U16 | U32 | UNKNOWN

<Number> refreshInterval

Refresh interval of the layer in minutes. Non-zero value indicates automatic layer refresh at the specified interval. Value of 0 indicates auto refresh is not enabled. (Added at v3.7)

<RasterFunction> renderingRule

Specifies the rendering rule for how the requested image should be rendered. View the Raster Functions help topic in the REST help for more details.

<Boolean> showAttribution

When true, the layer's attribution is displayed on the map. (Added at v3.1)
Known values: true | false
Default value: true

<SpatialReference> spatialReference

The spatial reference of the map service. See Projected Coordinate Systems and Geographic Coordinate Systems for the list of supported spatial references.

<Boolean> suspended

When true, the layer is suspended. A layer is considered to be suspended when one of the following is true:
  • The layer is hidden.
  • The layer is not visible at the current map scale.
  • The layer is explicitly suspended by calling the Layer.suspend method.
(Added at v3.1)
Known values: true | false

<TimeInfo> timeInfo

Temporal information for the layer, such as time extent. If this property is null or not specified, then the layer does not support time-related operations.
Sample:
var timeInfo = imageServiceLayer.timeInfo;

<String> url

URL to the ArcGIS Server REST resource that represents a map service. To obtain the URL, use Services Directory. An example URL for the Street Map service on ArcGIS Online is:
https://server.arcgisonline.com/arcgis/rest/services/World_Imagery/MapServer. (Added at v1.2)

<Boolean> useMapImage

By default, images are exported in MIME format, and the image is streamed to the client. When useMapImage is set to true, the image is saved to the server, and a JSON formatted response is sent to the client with the URL location of the image. A second call is automatically made to the server to retrieve the image. This methodology is required for secure services that go through a proxy server. In this situation, a map image cannot be streamed. (Added at v3.9)
Known values: true | false
Default value: false

<Number> version

The version of ArcGIS Server the image service is published to, such as 9.3, 9.31, 10, 10.41.

<Boolean> visible

Visibility of the layer.
Known values: true | false
Default value: true

<Boolean> visibleAtMapScale

When true, the layer is visible at the current map scale. (Added at v3.1)
Known values: true | false
Method Details

attr(name, value)

Adds a new attribute or changes the value of an existing attribute on the layer's node. Removes the attribute if the value is null or undefined. (Added at v3.7)
Return type: Layer
Parameters:
<String> name Required The name of the attribute.
<String> value Required The value of the attribute. Set this value as null to remove the attribute.

exportMapImage(imageServiceParameters?, callback?)

Exports a map using values as specified by ImageServiceParameters. On completion, MapImage is returned.
Parameters:
<ImageServiceParameters> imageServiceParameters Optional Input parameters assigned before exporting the map image.
<Function> callback Optional The function to call when the method has completed. The arguments in the function are the same as the onMapImageExport event.

getAttributionData()

Asynchrously returns custom data for the layer when available. (Added at v3.1)
Return type: Deferred

getDefinitionExpression()

Returns the current definition expression. (Added at v3.6)
Return type: String

getImageUrl(extent, width, height, callback)

Method to implement when extending DynamicMapServiceLayer. For more details, see Creating custom layer types. (Added at v1.3)
Return type: String
Parameters:
<Extent> extent Required Current extent of the map.
<Number> width Required Current width of the map in pixels.
<Number> height Required Current height of the map in pixels.
<Function> callback Required The function to call when the method has completed.

getKeyProperties()

Get key properties of an ImageService including information such as the band names associated with the imagery. (Added at v3.5)
Return type: Deferred

getMap()

Returns reference to the map control the layer is added to. Returns null or undefined if it is not added to a map. (Added at v3.7)
Return type: Map

getNode()

Returns the layer's DOM node. (Added at v3.7)
Return type: HTMLElement

getRasterAttributeTable()

Asynchronously returns the raster attribute table of an ImageService which returns categorical mapping of pixel values (for example a class, group, category, or membership). (Added at v3.6)
Return type: Deferred

getVisibleRasters()

Gets the currently visible rasters. (Added at v3.6)
Return type: Graphic[]

hide()

Sets the visibility of the layer to "false". The layer is not removed, but it is hidden from view.

isVisibleAtScale(scale)

Returns true if the layer is visible at the given scale. (Added at v3.1)
Return type: Boolean
Parameters:
<Number> scale Required The scale at which to check if the layer is visible.

queryVisibleRasters(query, options?, callback?, errback?)

Returns the rasters that are visible in the area defined by the geometry (required to be point or polygon) in the query parameter. It honors time definition, info template fields, mosaic rule and rendering rule. Options parameter is optional and can be used to describe the prefix to be used with the raster attribute table fields using the 'rasterAttributeTableFieldPrefix' property. This method is a wrapper around an Image Service's Identify. (Added at v3.6)
Parameters:
<Query> query Required The esri.tasks.Query to be passed as the input to query visible rasters.
<Object> options Optional Options for query. Use the rasterAttributeTableFieldPrefix property to describe the prefix to be used with the raster attribute table fields.
<Function> callback Optional The function to call when the method has completed.
<String> errback Optional The function to call when an error occurs.

refresh()

Refreshes the map by making a new request to the server. In order to refresh the layer in this manner, setDisableClientCaching must be true. This ensures that map images are not cached on the client. (Added at v1.2)

resume()

Resumes layer drawing. (Added at v3.1)

setBandIds(bandIds, doNotRefresh?)

Sets the R,G,B of the exported image to the appropriate ImageService Band ID. BandIds are zero based.
Parameters:
<Number[]> bandIds Required Array of band IDs to use in the exported image.
<Boolean> doNotRefresh Optional When true the layer will not refresh the map image. The default value is false. Added at version 2.2.
Sample:
myArcGISImageServiceLayer.setBandIds([2,1,0]);
See also: bandIds

setCompressionQuality(quality, doNotRefresh?)

Sets the compression quality of the exported image. Only valid with JPG image format.
Parameters:
<Number> quality Required A value from 0 to 100. 100 is best quality but largest in file size.
<Boolean> doNotRefresh Optional When true the layer will not refresh the map image. The default value is false. Added at version 2.2.

setDefinitionExpression(expression, doNotRefresh)

Sets the definition expression for the ImageService Layer. Only the rasters that match the definition expression are displayed. (Added at v3.6)
Parameters:
<String> expression Required The definition expression to be set.
<Boolean> doNotRefresh Required Whether or not the expression definition will be refreshed.

setDisableClientCaching(disable)

Sets whether images are always requested from the server and the browser's cache is ignored. This should be used when the data supporting the map service changes frequently.
Parameters:
<Boolean> disable Required When true, browser client side caching is disabled.

setImageFormat(imageFormat, doNotRefresh?)

Set the image format.
Parameters:
<String> imageFormat Required Valid values are png | png8 | png24 | jpg | pdf | bmp | gif | svg.
<Boolean> doNotRefresh Optional When true the layer will not refresh the map image. The default value is false. Added at version 2.2.
Sample:

imageServiceLayer.setImageFormat("png8");

See also: format

setInfoTemplate(infoTemplate)

Specify or change the info template for a layer. (Added at v3.6)
Parameters:
<InfoTemplate> infoTemplate Required The content for display in an InfoWindow.

setInterpolation(interpolation, doNotRefresh?)

Sets the interpolation method. The interpolation method affects how the raster dataset is transformed when it undergoes warping or when it changes coordinate space.
Parameters:
<String> interpolation Required Interpolation value defined in ImageServiceParameters Constants Table.
<Boolean> doNotRefresh Optional When true the layer will not refresh the map image. The default value is false. Added at version 2.2.
See also: interpolation

setMaxScale(scale)

Set the maximum scale for the layer. (Added at v3.1)
Parameters:
<Number> scale Required The maximum scale at which the layer is visible.

setMinScale(scale)

Set the minimum scale for the layer. (Added at v3.1)
Parameters:
<Number> scale Required The minimum scale at which the layer is visible.

setMosaicRule(mosaicRule, doNotRefresh?)

Sets the mosaic rule of the layer to the specified value. The mosaic rule defines how individual images should be mosaicked. Refreshes the layer to reflect the mosaic rule. (Added at v2.0)
Parameters:
<MosaicRule> mosaicRule Required The mosaic rule.
<Boolean> doNotRefresh Optional When true the layer will not refresh the map image. The default value is false. Added at version 2.2.
Sample:
var mr = new esri.layers.MosaicRule();
mr.method = esri.layers.MosaicRule.METHOD_VIEWPOINT;
mr.viewpoint = inPoint;
layer.setMosaicRule(mr);

setOpacity(opacity)

Sets the opacity of the layer. Values range from 0.0 to 1.0, where 0.0 is 100% transparent and 1.0 has no transparency.
Parameters:
<Number> opacity Required Value from 0 to 1, where 0 is 100% transparent and 1 has no transparency. The default value is 1.
Sample:

layer.setOpacity(0.5);

setRefreshInterval(interval)

Changes the layer's refresh interval to the given value (in minutes). Non-zero value sets up automatic layer refresh at the specified interval. Value of 0 stops auto refresh. (Added at v3.7)
Return type: Layer
Parameters:
<Number> interval Required Refresh interval of the layer in minutes. Non-zero value indicates automatic layer refresh at the specified interval. Value of 0 indicates auto refresh is not enabled.

setRenderingRule(renderingRule, doNotRefresh?)

Sets the rendering rule of the layer to the given value. Refreshes the layer to reflect the rendering rule. (Added at v2.0)
Parameters:
<RasterFunction> renderingRule Required The new rendering rule.
<Boolean> doNotRefresh Optional When true the layer will not refresh the map image. The default value is false. Added at version 2.2.
Sample:
var rasterFunction = new esri.layers.RasterFunction();
rasterFunction.functionName = "Stretch";
var arguments = {};
arguments.StretchType= stretch;
arguments.NumberOfStandardDeviations = parseFloat(dojo.byId('txtSD').value);
arguments.Gamma =[1.25,2,3.95];
arguments.Statistics = [[0.2, 222.46, 99.35, 1.64],[ 5.56, 100.345, 45.4, 3.96],[0, 352.37, 172.284, 2]];
rasterFunction.arguments = arguments; 
rasterFunction.variableName = "Raster";
imageServiceLayer.setRenderingRule(rasterFunction);

setScaleRange(minScale, maxScale)

Set the scale range for the layer. If minScale and maxScale are set to 0 then the layer will be visible at all scales. (Added at v3.1)
Parameters:
<Number> minScale Required The minimum scale at which the layer is visible.
<Number> maxScale Required The maximum scale at which the layer is visible.

setUseMapTime(update)

Determine if the layer will update its content based on the map's current time extent. Default value is true. (Added at v2.2)
Parameters:
<Boolean> update Required When false the layer will not update its content based on the map's time extent. Default value is true.

setVisibility(isVisible)

Sets the visibility of the layer. When true, the layer is visible.
Parameters:
<Boolean> isVisible Required Set the visibility of the layer.

show()

Sets the visibility of the layer to "true".

suspend()

Suspends layer drawing. (Added at v3.1)
Event Details
[ On Style Events | Connect Style Event ]

error

Fires when there is a problem retrieving a layer. Should be used in favor of onError. (Added at v3.5)
Event Object Properties:
<Error> error ArcGIS Server error message returned in a JavaScript error object.

load

Fires after layer properties for the layer are successfully populated. This event must be successful before the layer can be added to the map. Should be used in favor of onLoad. (Added at v3.5)
Event Object Properties:
<Layer> layer The loaded layer.

map-image-export

Fires when the map export is completed. (Added at v3.6)
Event Object Properties:
<MapImage> mapImage Contains the properties of a dynamically generated map image.

mosaic-rule-change

Fired when the layers mosaic rule is changed. Should be used in favor of "onMosaicRuleChange". (Added at v3.6)

opacity-change

Fires when the layer opacity has been changed, and returns an object with the opacity value. Should be used in favor of onOpacityChange. (Added at v3.5)
Event Object Properties:
<Number> opacity Fires when the layer opacity (transparency) changes. A number property named opacity that indicates the new opacity. Values range from 0.0 to 1.0, where 0.0 is 100% transparent and 1.0 has no transparency.

refresh-interval-change

This event is fired when the layer's refreshInterval is modified. (Added at v3.7)

rendering-change

Fired when the layers band ids are changed or if a raster function is applied. Should be used in favor of "onRenderingChange". (Added at v3.5)

resume

Fires when a layer resumes drawing. Should be used in favor of onResume. (Added at v3.5)

scale-range-change

Fires when a layer's minScale and/or maxScale is changed. Should be used in favor of onScaleRangeChange. (Added at v3.5)

scale-visibility-change

Fires when a layer's scale visibility changes. The scale visibility changes when a layer is initially visible and becomes invisible because the map scale does not intersect the layer's scale range or vice versa. Should be used in favor of onScaleVisibilityChange. (Added at v3.5)

suspend

Fires when a layer suspends drawing. Should be used in favor of onSuspend. (Added at v3.5)

update

Fires any time a layer has finished loading or updating itself. For an ArcGISTiledMapServiceLayer, the event fires when all required tiles have been retrieved and displayed. For an ArcGISDynamicMapServiceLayer or ArcGISImageServiceLayer, the event fires when the map image has been retrieved and displayed. For a GraphicsLayer, the event fires when all graphics have been redrawn after a pan or zoom. Deprecated at v2.0. Use update-start and update-end instead. (Added at v3.6)

update-end

Fires when a layer has finished updating its content. It is the responsibility of the subclass to determine when this event is fired. Should be used in favor of onUpdateEnd. (Added at v3.5)
Event Object Properties:
<Error> error Optional argument. The error object is available when an error occurs during the update.

update-start

Fires when a layer begins to update its content. It is the responsibility of the subclass to determine when this event is fired. Should be used in favor of onUpdateStart. (Added at v3.5)

visibility-change

Fires when the layer visibility has been changed, and returns an object with a Boolean visible property containing the new visibility value of the layer. Should be used in favor of onVisibilityChange. (Added at v3.5)
Event Object Properties:
<Boolean> visible Fires when the layer visibility changes. A boolean property named visible indicates whether or not the layer is visible after visibility changed.
Show Modal