This page describes an older version, please see latest API at http://resources.arcgis.com/en/help/flex-api/apiref/com/esri/ags/layers/ArcGISImageServiceLayer.html.
Packagecom.esri.ags.layers
Classpublic class ArcGISImageServiceLayer
InheritanceArcGISImageServiceLayer Inheritance DynamicMapServiceLayer Inheritance Layer Inheritance mx.core.UIComponent

Allows you to work with an Image Service resource exposed by the ArcGIS Server REST API (available in ArcGIS Server 9.3 and above). Image Service is new in ArcGIS 9.3 and is a lighter-weight service optimized for delivering raw or finished imagery that can be RGB, panchromatic, multispectral, or elevation data stored in a geodatabase or file system. Data sources for Image Services can be raster datasets, in formats such as TIFF, MrSID, IMAGINE (IMG), or JPEG2000, as well as raster mosaics.

Note that ArcGISImageServiceLayer, like all layers, extend UIComponent and thus include basic mouse events, such as: click, mouseOut, mouseOver, and mouseDown, as well as other events like show and hide, and general properties, such as alpha and visible.

See also

com.esri.ags.events.LayerEvent
Live sample - Using ImageService
- Using Hillshade raster function
Live sample - Using Stretch raster function
Live sample - Query a raster catalog in an ImageService
Image Service in REST documentation
Publishing Image Services (.net)
Publishing Image Services (Java)
About serving raster and image data [ArcGIS desktop help]
What is raster data? [ArcGIS desktop help]


Public Properties
 PropertyDefined By
  bandCount : Number
[read-only] Number of bands in ArcGISImageServiceLayer.
ArcGISImageServiceLayer
  bandIds : Array
If there are multiple bands, you can either specify a single band to export, or you can change the band combination (red, green, blue) by specifying the band number, for example, [2, 1, 3].
ArcGISImageServiceLayer
  compressionQuality : Number
Controls how much loss the image will be subjected to by the compression algorithm.
ArcGISImageServiceLayer
  copyright : String
[read-only] Map copyright as defined by the map service.
ArcGISImageServiceLayer
  description : String
[read-only] Map description as defined by the map service.
ArcGISImageServiceLayer
  disableClientCaching : Boolean
If true, adds a timestamp parameter ("_ts") to the REST request to prevent the request from being loaded from the browser's cache.
ArcGISImageServiceLayer
  fields : Array
[read-only] The fields of the image service as specified in the Service Directory.
ArcGISImageServiceLayer
  imageFormat : String
The output image type.
ArcGISImageServiceLayer
  initialExtent : Extent
[override] [read-only] Initial extent as defined by the image service.
ArcGISImageServiceLayer
  interpolation : String
The resampling process of extrapolating the pixel values while transforming the raster dataset when it undergoes warping or when it changes coordinate space.
ArcGISImageServiceLayer
 InheritedisInScaleRange : Boolean
[read-only] Returns true if the current scale of the map is between the maximum and minimum scale of the layer [added in version 1.3].
Layer
 Inheritedloaded : Boolean
[read-only] When the layer is loaded, the value becomes "true" and layer properties can be accessed.
Layer
 InheritedloadFault : Fault
[read-only] A reference to the fault that is dispatched when the layer throws a loadError event.
Layer
 Inheritedmap : Map
[read-only] A reference to the Map this layer is in.
Layer
  maxBandValues : Array
[read-only] Contains array of Numbers where each index represents a single band.
ArcGISImageServiceLayer
  maxPixelSize : Number
[read-only] The maximum pixel size.
ArcGISImageServiceLayer
 InheritedmaxScale : Number
The maximum scale of the layer [added in version 1.3].
Layer
  meanBandValues : Array
[read-only] Contains array of Numbers where each index represents a single band.
ArcGISImageServiceLayer
  minBandValues : Array
[read-only] Contains array of Numbers where each index represents a single band.
ArcGISImageServiceLayer
  minPixelSize : Number
[read-only] The minimum pixel size.
ArcGISImageServiceLayer
 InheritedminScale : Number
The minimum scale of the layer [added in version 1.3].
Layer
  mosaicRule : MosaicRule
Specifies the mosaic rule when defining how individual images should be mosaicked.
ArcGISImageServiceLayer
  noData : Number
The pixel value representing no information.
ArcGISImageServiceLayer
  objectIdField : String
[read-only] The name of the object ID field.
ArcGISImageServiceLayer
  pixelSizeX : Number
[read-only] Size of pixel in X direction.
ArcGISImageServiceLayer
  pixelSizeY : Number
[read-only] Size of pixel in Y direction.
ArcGISImageServiceLayer
  pixelType : String
[read-only] The pixel type, also known as data type, pertains to the type of values stored in the raster, such as signed integer, unsigned integer, or floating point.
ArcGISImageServiceLayer
  proxyURL : String
The URL to proxy the request through.
ArcGISImageServiceLayer
  renderingRule : RasterFunction
Specifies the rendering rule for how the requested image should be rendered.
ArcGISImageServiceLayer
  requestTimeout : int
The request timeout in seconds.
ArcGISImageServiceLayer
  serviceDataType : String
[read-only]
ArcGISImageServiceLayer
  serviceDescription : String
[read-only] Map service description as defined by the map service.
ArcGISImageServiceLayer
  spatialReference : SpatialReference
[override] [read-only] The spatial reference of the image service.
ArcGISImageServiceLayer
  stdvBandValues : Array
[read-only] Contains array of Numbers where each index represents a single band.
ArcGISImageServiceLayer
  timeInfo : TimeInfo
[read-only] Only the TimeInfo's timeExtent and timeReference properties may be available [added in version 2.0].
ArcGISImageServiceLayer
  timeOffset : Number
The time offset for the layer [added in version 2.0].
ArcGISImageServiceLayer
  timeOffsetUnits : String
The units of the timeOffset [added in version 2.0].
ArcGISImageServiceLayer
  token : String
Token for accessing a secure ArcGIS Image service.
ArcGISImageServiceLayer
  units : String
[override] The units of the layer.
ArcGISImageServiceLayer
  url : String
URL endpoint of an image service.
ArcGISImageServiceLayer
  useMapTime : Boolean
If true and the image service is time aware, a new image will be requested whenever the map's timeExtent changes.
ArcGISImageServiceLayer
  version : Number
[read-only] The version of ArcGIS Server where the image service is published to, for example, 9.3, 9.31, 10, 10.01 or 10.1.
ArcGISImageServiceLayer
Public Methods
 MethodDefined By
  
ArcGISImageServiceLayer(url:String = null, proxyURL:String = null, token:String = null)
Creates a new ArcGISImageServiceLayer.
ArcGISImageServiceLayer
  
exportMapImage(imageServiceParameters:ImageServiceParameters = null, responder:IResponder = null):AsyncToken
Exports a map image using values from the layer as defaults.
ArcGISImageServiceLayer
 Inherited
refresh():void
Causes the layer to redraw or reload its content.
Layer
Protected Methods
 MethodDefined By
 Inherited
Adds listeners for ExtentEvent.EXTENT_CHANGE, ZoomEvent.ZOOM_START, ZoomEvent.ZOOM_UPDATE and ZoomEvent.ZOOM_END.
Layer
 Inherited
When an EXTENT_CHANGE event occurs, this calls invalidateLayer();
Layer
 Inherited
hideHandler(event:FlexEvent):void
When the layer is hidden (visible is set to false), this calls removeMapListeners().
Layer
 Inherited
Subclasses should call this whenever they would like to have updateLayer() called on them.
Layer
 Inherited
loadMapImage(loader:Loader):void
Subclasses must override this method.
DynamicMapServiceLayer
 Inherited
Removes all the layers children.
Layer
 Inherited
Removes the four event listeners added by addMapListeners();
Layer
 Inherited
setLoaded(value:Boolean):void
Subclasses must call this when they've loaded all their properties and are ready to load their content.
Layer
 Inherited
showHandler(event:FlexEvent):void
When the layer is shown (visible is set to true), this calls addMapListeners() and invalidateLayer().
Layer
 Inherited
toScreenX(mapX:Number):Number
Converts the x-coordinate of map point to a screen point.
Layer
 Inherited
toScreenY(mapY:Number):Number
Converts the y-coordinate of map point to a screen point.
Layer
 Inherited
Subclasses must override this method.
Layer
 Inherited
Finishes the zoom animation.
Layer
 Inherited
Prepares the zoom animation by taking a bitmap of the layer.
Layer
 Inherited
Redraws the bitmap of the layer.
Layer
Events
 Event Summary Defined By
  Dispatched when an exportMapImage operation fails.ArcGISImageServiceLayer
 InheritedFires if the value of isInScaleRange changes.Layer
 InheritedFires after layer properties for the layer are successfully populated.Layer
 InheritedFires if the layer is unable to load.Layer
  Dispatched when an exportMapImage operation successfully completes.ArcGISImageServiceLayer
 InheritedFires when the layer has finished updating its content.Layer
 InheritedFires when the layer begins to update its content.Layer
Property Detail
bandCountproperty
bandCount:Number  [read-only]

Number of bands in ArcGISImageServiceLayer.

This property can be used as the source for data binding.


Implementation
    public function get bandCount():Number
bandIdsproperty 
bandIds:Array

If there are multiple bands, you can either specify a single band to export, or you can change the band combination (red, green, blue) by specifying the band number, for example, [2, 1, 3].

This property can be used as the source for data binding.


Implementation
    public function get bandIds():Array
    public function set bandIds(value:Array):void
compressionQualityproperty 
compressionQuality:Number

Controls how much loss the image will be subjected to by the compression algorithm. Valid value ranges of compression quality are from 0 to 100.

The default value is undefined.

This property can be used as the source for data binding.


Implementation
    public function get compressionQuality():Number
    public function set compressionQuality(value:Number):void
copyrightproperty 
copyright:String  [read-only]

Map copyright as defined by the map service.

This property can be used as the source for data binding.


Implementation
    public function get copyright():String
descriptionproperty 
description:String  [read-only]

Map description as defined by the map service.

This property can be used as the source for data binding.


Implementation
    public function get description():String
disableClientCachingproperty 
disableClientCaching:Boolean

If true, adds a timestamp parameter ("_ts") to the REST request to prevent the request from being loaded from the browser's cache.

The default value is false.

This property can be used as the source for data binding.


Implementation
    public function get disableClientCaching():Boolean
    public function set disableClientCaching(value:Boolean):void
fieldsproperty 
fields:Array  [read-only]

The fields of the image service as specified in the Service Directory.

This property can be used as the source for data binding.


Implementation
    public function get fields():Array

See also

imageFormatproperty 
imageFormat:String

The output image type. Valid types are: jpgpng | png8 | png24 | png32 | jpg | gif. Note that support for the jpgpng format was added at ArcGIS Server 10.0. This format returns a JPG if there are no transparent pixels in the requested extent, otherwise it returns a PNG.

This property can be used as the source for data binding.


Implementation
    public function get imageFormat():String
    public function set imageFormat(value:String):void
initialExtentproperty 
initialExtent:Extent  [read-only] [override]

Initial extent as defined by the image service. Used by the map if it is the first layer in the map and map doesn't have an extent specified.

This property can be used as the source for data binding.


Implementation
    public function get initialExtent():Extent
interpolationproperty 
interpolation:String

The resampling process of extrapolating the pixel values while transforming the raster dataset when it undergoes warping or when it changes coordinate space. Valid values are: RSP_BilinearInterpolation | RSP_CubicConvolution | RSP_Majority | RSP_NearestNeighbor

This property can be used as the source for data binding.


Implementation
    public function get interpolation():String
    public function set interpolation(value:String):void

See also

maxBandValuesproperty 
maxBandValues:Array  [read-only]

Contains array of Numbers where each index represents a single band.

This property can be used as the source for data binding.


Implementation
    public function get maxBandValues():Array

See also

maxPixelSizeproperty 
maxPixelSize:Number  [read-only]

The maximum pixel size.

This property can be used as the source for data binding.


Implementation
    public function get maxPixelSize():Number
meanBandValuesproperty 
meanBandValues:Array  [read-only]

Contains array of Numbers where each index represents a single band.

This property can be used as the source for data binding.


Implementation
    public function get meanBandValues():Array

See also

minBandValuesproperty 
minBandValues:Array  [read-only]

Contains array of Numbers where each index represents a single band.

This property can be used as the source for data binding.


Implementation
    public function get minBandValues():Array

See also

minPixelSizeproperty 
minPixelSize:Number  [read-only]

The minimum pixel size.

This property can be used as the source for data binding.


Implementation
    public function get minPixelSize():Number
mosaicRuleproperty 
mosaicRule:MosaicRule

Specifies the mosaic rule when defining how individual images should be mosaicked. It specifies selection, mosaic method, sort order, overlapping pixel resolution, etc. Mosaic rules are for mosaicking rasters in the mosaic dataset.

    A mosaic rule is used to define:
  1. the selection of rasters that will participate in the mosaic (using where clause);
  2. the mosaic method, for example, how the selected rasters are ordered;
  3. the mosaic operation, for example, how overlapping pixels at the same location are resolved.

This property can be used as the source for data binding.


Implementation
    public function get mosaicRule():MosaicRule
    public function set mosaicRule(value:MosaicRule):void
noDataproperty 
noData:Number

The pixel value representing no information.

The default value is undefined.

This property can be used as the source for data binding.


Implementation
    public function get noData():Number
    public function set noData(value:Number):void
objectIdFieldproperty 
objectIdField:String  [read-only]

The name of the object ID field.

This property can be used as the source for data binding.


Implementation
    public function get objectIdField():String
pixelSizeXproperty 
pixelSizeX:Number  [read-only]

Size of pixel in X direction.

This property can be used as the source for data binding.


Implementation
    public function get pixelSizeX():Number

See also

pixelSizeYproperty 
pixelSizeY:Number  [read-only]

Size of pixel in Y direction.

This property can be used as the source for data binding.


Implementation
    public function get pixelSizeY():Number

See also

pixelTypeproperty 
pixelType:String  [read-only]

The pixel type, also known as data type, pertains to the type of values stored in the raster, such as signed integer, unsigned integer, or floating point.

This property can be used as the source for data binding.


Implementation
    public function get pixelType():String
proxyURLproperty 
proxyURL:String

The URL to proxy the request through.

This property can be used as the source for data binding.


Implementation
    public function get proxyURL():String
    public function set proxyURL(value:String):void
renderingRuleproperty 
renderingRule:RasterFunction

Specifies the rendering rule for how the requested image should be rendered.

This property can be used as the source for data binding.


Implementation
    public function get renderingRule():RasterFunction
    public function set renderingRule(value:RasterFunction):void
requestTimeoutproperty 
requestTimeout:int

The request timeout in seconds. A value less than or equal to zero prevents request timeout.

The default value is -1.

This property can be used as the source for data binding.


Implementation
    public function get requestTimeout():int
    public function set requestTimeout(value:int):void
serviceDataTypeproperty 
serviceDataType:String  [read-only]

This property can be used as the source for data binding.


Implementation
    public function get serviceDataType():String
serviceDescriptionproperty 
serviceDescription:String  [read-only]

Map service description as defined by the map service.

This property can be used as the source for data binding.


Implementation
    public function get serviceDescription():String
spatialReferenceproperty 
spatialReference:SpatialReference  [read-only] [override]

The spatial reference of the image service.

This property can be used as the source for data binding.


Implementation
    public function get spatialReference():SpatialReference
stdvBandValuesproperty 
stdvBandValues:Array  [read-only]

Contains array of Numbers where each index represents a single band.

This property can be used as the source for data binding.


Implementation
    public function get stdvBandValues():Array

See also

timeInfoproperty 
timeInfo:TimeInfo  [read-only]

Only the TimeInfo's timeExtent and timeReference properties may be available [added in version 2.0].

This property can be used as the source for data binding.


Implementation
    public function get timeInfo():TimeInfo
timeOffsetproperty 
timeOffset:Number

The time offset for the layer [added in version 2.0].

This property can be used as the source for data binding.


Implementation
    public function get timeOffset():Number
    public function set timeOffset(value:Number):void
timeOffsetUnitsproperty 
timeOffsetUnits:String

The units of the timeOffset [added in version 2.0].

This property can be used as the source for data binding.


Implementation
    public function get timeOffsetUnits():String
    public function set timeOffsetUnits(value:String):void

See also

tokenproperty 
token:String

Token for accessing a secure ArcGIS Image service.

This property can be used as the source for data binding.


Implementation
    public function get token():String
    public function set token(value:String):void
unitsproperty 
units:String[override]

The units of the layer. If the layer is the basemap, the map is in these units.

The default value is UNKNOWN_UNITS.

This property can be used as the source for data binding.


Implementation
    public function get units():String
    public function set units(value:String):void

See also

urlproperty 
url:String

URL endpoint of an image service. To obtain the URL, use ArcGIS Services Directory.

This property can be used as the source for data binding.


Implementation
    public function get url():String
    public function set url(value:String):void
useMapTimeproperty 
useMapTime:Boolean

Since : ArcGIS API for Flex 2.2

If true and the image service is time aware, a new image will be requested whenever the map's timeExtent changes.

The default value is true.

This property can be used as the source for data binding.


Implementation
    public function get useMapTime():Boolean
    public function set useMapTime(value:Boolean):void
versionproperty 
version:Number  [read-only]

Since : ArcGIS API for Flex 2.2

The version of ArcGIS Server where the image service is published to, for example, 9.3, 9.31, 10, 10.01 or 10.1.

This property can be used as the source for data binding.


Implementation
    public function get version():Number
Constructor Detail
ArcGISImageServiceLayer()Constructor
public function ArcGISImageServiceLayer(url:String = null, proxyURL:String = null, token:String = null)

Creates a new ArcGISImageServiceLayer.

Parameters
url:String (default = null) — URL to the ArcGIS Server REST resource that represents an image service.
 
proxyURL:String (default = null) — The URL to proxy the request through.
 
token:String (default = null) — Token for accessing a secure ArcGIS Image service.
Method Detail
exportMapImage()method
public function exportMapImage(imageServiceParameters:ImageServiceParameters = null, responder:IResponder = null):AsyncToken

Exports a map image using values from the layer as defaults. On completion, MapImage is returned. The mapImageExport event is also fired.

Parameters

imageServiceParameters:ImageServiceParameters (default = null) — Input parameters to use when exporting the map image. Non-null properties override the layer's values.
 
responder:IResponder (default = null) — IResponder to pass the MapImage result to.

Returns
AsyncToken

See also

Event Detail
fault Event
Event Object Type: mx.rpc.events.FaultEvent
FaultEvent.type property = mx.rpc.events.FaultEvent.FAULT

Dispatched when an exportMapImage operation fails.

mapImageExport Event  
Event Object Type: com.esri.ags.events.MapImageEvent
MapImageEvent.type property = com.esri.ags.events.MapImageEvent.EXPORT

Dispatched when an exportMapImage operation successfully completes.

Defines the value of the type property of a mapImageExport event object.