definitionExpression on a raster ?

176
2
Jump to solution
09-23-2019 01:35 PM
JUBJUB
by
New Contributor II

I have a MapImageLayer who contains both featureLayer and raster (referenced .tif).

I am able to apply a "definitionExpression" on the feature layer with an SQL expression but not on the raster.

var layer = new MapImageLayer({    url: "https://sampleserver6.arcgisonline.com/arcgis/rest/services/USA/MapServer",    sublayers: [       {          id: 1, // for example this one is a raster          definitionExpression: "Pixel > 6" // Which SQL where clause here ????? Pixel ? PixelValue ?       },       {          id: 0// for example this one is a FeatureLayer          definitionExpression: "pop2000 > 100000" // Works on a FeatureLayer !!!!!       }    ] });

Is it possible to query a raster on a MapImageLayer ? Or do I have to query an ImageLayer ?

My goal is then to apply a client slider on the raster like in this example : https://developers.arcgis.com/javascript/3/sandbox/sandbox.html?sample=layers_raster

Is it possible to apply a slider on a raster contents in a MapImageLayer ? Or maybe this slider only works on ImageryLayer ?

Thanks

0 Kudos
1 Solution

Accepted Solutions
UndralBatsukh
Esri Regular Contributor

Hi there,

Yep it only works with ImageLayer and the service has to be ImageService.

-Undral

View solution in original post

2 Replies
UndralBatsukh
Esri Regular Contributor

Hi there,

Yep it only works with ImageLayer and the service has to be ImageService.

-Undral

JUBJUB
by
New Contributor II

Thanks Undral for your answer

0 Kudos