AnsweredAssumed Answered

How to add raster data to map

Question asked by fengyunshen on Oct 29, 2015
Latest reply on Nov 1, 2015 by fengyunshen

I publish a  map service and it supports dynamic layers. In the map server's dynamic workspaces, i add 'Raster Folder' type workspace. How to add raster data to the map, in javascript api?

//get raster datasource

//set RasterDataSource
var rasterDataSource = new RasterDataSource();
rasterDataSource.workspaceId = "MyRasterWorkspaceID";
rasterDataSource.dataSource = "test"

//set LayerDataSource
var layerDataSource = new LayerDataSource();
layerDataSource.dataSource = rasterDataSource;

//next step, how to display the raster data to the map?
//arcgis server url: http://localhost:6080/arcgis/rest/services/test/MapServer/dynamicLayer