Select to view content in your preferred language

How to add raster data to map

3174
2
10-29-2015 08:12 PM
fengyunshen
Deactivated User

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
0 Kudos
2 Replies
RickeyFight
MVP Regular Contributor

Fengyum,

Do you just want to add a raster layer to a map?

If so look here:

Not Able to Add a RasterLayer to Map

fengyunshen
Deactivated User

Thank you, Rickey Fite. The published map server did not contain the raster data as one layer of the server.

0 Kudos