Load single raster from Image Service

08-25-2016 08:02 PM
New Contributor II

I have managed to publish multiple raster (tiff) under one mosaic dataset as Image Service.

I also manage to use ArcGISImageServiceLayer to load the ImageServer above.

but how do I retrieve a single raster image based on their name?

I tried to set the ImageServiceLayer initialExtent and fullExtent, but ImageServiceLayer always use the Map Extent which always return all the rasters.

I also used "setDefinitionExpression" method in ImageServiceLayer but there is nothing being drawn on the map.

The closest that I manage to do was:
1. use query on ImageServer with Name = '<raster_name>'
2. Get the Extent of the return record
3. Create ImageServiceParameters with Extent in #2 above as value
4. use exportMapImage and pass in ImageServiceParameters in #3 above.

When I check Chrome debugging console, #4 above return the correct image that I want to load.

Question is:
How do i load the MapImage returned by the method callback into current ImageServiceLayer?

0 Kudos
0 Replies