Client-Side query on ImageryLayer?

393
4
Jump to solution
04-08-2021 06:44 AM
MaggieWoo
New Contributor

After seeing the performance of client-side query in JS API, I wonder if this is possible with the ImageryLayer? Example, use a slider to split above/below rendering of pixels dynamically.

0 Kudos
1 Solution

Accepted Solutions
UndralBatsukh
Esri Regular Contributor

Hi Maggie,

You can use pixelFilter to colorize each pixel. Please call redraw method on ImageryLayer to redraw the layer if the pixelFilter is updated at runtime. Please take a look at this example. Will this work for you?

View solution in original post

0 Kudos
4 Replies
UndralBatsukh
Esri Regular Contributor

Hi there, 

You can render ImageryLayer on the client-side using renderer or pixelFilter properties provided that you requested the images in lerc format.  In the overview section of ImageryLayer class you will see a section of different ways of rendering ImageryLayer. The doc also explains when and how you can render your imagery on the client side. 

The following samples show you how interact with ImageryLayer on the client side. 
Client-side rendering rules

Client-side pixelFilter

Client-side charting for ImageryLayer


Hope this helps,

-Undral

0 Kudos
MaggieWoo
New Contributor

Thank you for the response. I did look at those pages you reference, but none of them seemed to indicate that the rendering could be dynamic without refreshing the layer. Am I missing something?

EDIT: in looking around some more, maybe this is really an "animation" question? If I had a slider, for example, that a user can control, can the imagery layer colors be changed according to where the user moves the slider, perhaps using a dimension animation

0 Kudos
UndralBatsukh
Esri Regular Contributor

Hi Maggie,

You can use pixelFilter to colorize each pixel. Please call redraw method on ImageryLayer to redraw the layer if the pixelFilter is updated at runtime. Please take a look at this example. Will this work for you?

0 Kudos
MaggieWoo
New Contributor

Hi Undral,

Thanks for your response. I took it and fiddled with it to do what I wanted: https://codepen.io/brightgarden/pen/PoWRaPK?editors=0010

Although the dataset doesn't really make sense for what I was trying to do (I wanted to let users use the slider to explore a probability surface by changing pixels according to the ranges for high, medium, low, and none), still it was really helpful to know this could be done without refreshing the layer every time the user moved the slider!

Maggie

 

0 Kudos