JS API 4.10 - Clipping a single layer

1055
2
Jump to solution
12-20-2018 01:56 AM
RomanKönig
New Contributor III

We have the task to display only a small region of a layer (in our case a MapImageLayer) around the mouse, and the visible part should move with the mouse. It is some sort of overlay above the other layers.

In 4.9 we did this by clipping the canvas of this single layer, but since in 4.10 all layers draw on the same canvas we can't do that anymore.

One way we were thinking of is to initialize a second MapView above the first one holding only this single layer.

But that is just our first (and not preferred) idea because of complexity in view handling, event handling, etc.

Does anyone have any ideas how to achieve our goal in 4.10+ ?
Is it possible to force a layer to draw on it's own canvas above the other layers combind canvas?

Tags (2)
0 Kudos
1 Solution

Accepted Solutions
YannCabon
Esri Contributor

Hi Roman,

We are designing the API to make such feature possible with the webgl rendering. In 4.10 unfortunately you will have to work around it by handling 2 views.

Yann

View solution in original post

0 Kudos
2 Replies
YannCabon
Esri Contributor

Hi Roman,

We are designing the API to make such feature possible with the webgl rendering. In 4.10 unfortunately you will have to work around it by handling 2 views.

Yann

0 Kudos
RomanKönig
New Contributor III

Hi Yann Cabon
i looked through the API 4.11 documentation and i couldn't find anything about layer clipping. 
Can you confirm that this feature didn't make it into 4.11 or if so, point me in the right direction?

Thanks in advance, Roman

0 Kudos