Using ESRI JSAPI 3.16 and ArcGIS Server 10.4, I'm trying to work out how to display a user-specified TIF using a dynamic workspace associated with a ArcGISDynamicMapServiceLayer. So far, no luck. When I look at the REST request that is being submitted when I add my defined layer to the map, none of the dynamic information is being passed along so I end up with a blank image returned.
var rasterDataSource = new RasterDataSource();
rasterDataSource.workspaceId = "rasters";
rasterDataSource.dataSourceName = "cr_rc.tif";
var layerDataSource = new LayerDataSource();
layerDataSource.dataSource = rasterDataSource;
layerDataSource.type = "raster"
var dynamicLayerInfo = new DynamicLayerInfo();
dynamicLayerInfo.source = layerDataSource;
var rasterLayer = new ArcGISDynamicMapServiceLayer(
The export request that is sent by the map.addLayer functionality is:
Now, I can get the image I want with an export request that looks like this (decoded here, of course):
I just can't figure out how to get the JSAPI to tack on the dynamicLayers parameter to its export request. At least, I think that's my only problem.
Can anyone provide any suggestions regarding what I am missing or doing incorrectly here?