Description
Allows you to work with an image map service resource exposed by the ArcGIS Server REST API. (As of v1.2)
Class hierarchy
esri.Layer
|_ esri.layers.DynamicMapServiceLayer
|_ esri.layers.ArcGISImageServiceLayer
Constructor
Properties
| bandCount |
Number
|
Number of bands in ArcGISImageServiceLayer. |
| bandIds |
Number[]
|
Array of current band selections. |
| bands |
Object[]
|
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. |
| compressionQuality |
Number
|
Current compression quality value. The compression quality controls how much loss the image will be subjected to. Only valid with JPG image types. |
| copyrightText |
String
|
Copyright string as defined by the image service. |
| Description |
String
|
Description as defined by the image service. |
| disableClientCaching |
Boolean
|
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. |
| format |
String
|
The output image type. |
| interpolation |
String
|
Current interpolation method. The interpolation method affects how the raster dataset is transformed when it undergoes warping or when it changes coordinate space. |
| pixelSizeX |
Number
|
Size of pixel in X direction. |
| pixelSizeY |
Number
|
Size of pixel in Y direction. |
| pixelType |
Number
|
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. |
Methods
Events
Constructor Detail
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
http://sampleserver1.arcgisonline.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:
|
<String>
id |
Id to assign to the layer. If not assigned, esri.Map assigns value.
|
|
<ImageServiceParameters>
imageServiceParameters |
The image service parameter options used when exporting an Image Service layer.
|
|
<Number>
opacity |
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.
|
|
<Boolean>
visible |
Initial visibility of the layer. Default is true.
|
Properties Detail
Number of bands in ArcGISImageServiceLayer.
Array of current band selections.
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.
Code snippets:
The array is an object of the form:
[
{
"min": <Number>,
"max": <Number>,
"mean": <Number>,
"stddev": <Number>
},
...
]
<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.
Copyright string as defined by the image service.
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. (As of v1.2)
Known values: true | false
Default value: false
The output image type.
Known values: png8 | png24 | jpg | bmp | gif
Default value: png8
Current interpolation method. The interpolation method affects how the raster dataset is transformed when it undergoes warping or when it changes coordinate space.
Size of pixel in X direction.
Size of pixel in Y direction.
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
Methods Detail
exportMapImage(imageServiceParameters?, callback?)
Return value: none
Input 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. |
Sets the R,G,B of the exported image to the appropriate ImageService Band ID. BandIds are zero based.
Return value: none
Input Parameters:
|
<Number[]> bandIds |
Required |
Array of band IDs to use in the exported image.
myArcGISImageServiceLayer.setBandIds([2,1,0]);
|
setCompressionQuality(quality)
Sets the compression quality of the exported image. Only valid with JPG image format.
Return value: none
Input Parameters:
|
<Number> quality |
Required |
A value from 0 to 100. 100 is best quality but largest in file size. |
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.
Return value: none
Input Parameters:
|
<Boolean> disable |
Required |
When true, brower client side caching is disabled. |
setInterpolation(interpolation)
Sets the interpolation method. The interpolation method affects how the raster dataset is transformed when it undergoes warping or when it changes coordinate space.
Return value: none
Input Parameters:
Events Detail
onMapImageExport(mapImage)
Fires when the map export is completed.
Arguments:
|
<MapImage> mapImage
|
Contains the properties of a dynamically generated map image.
|