SwipeWidget and Sublayer

272
0
03-05-2021 09:13 AM
JB19
by
New Contributor II

Hello everyone,

I work with Arcgis JS Api 4.18

I would like to use two Sublayers from a MapImageLayer in a Swipe Widget.

But when I try to do that, I get this error :

 

[esri.core.Accessor] Accessor#set Assigning an instance of 'esri.layers.support.Sublayer' which is not a subclass of 'esri.layers.Layer'

 

I understand what is causing this error but I would like to know how to solve this.

I've tried to get the service URL from these two sublayers and to create two new MapImageLayers on the fly but I feel that's not the right way to do it.

Could you please tell me what would be the best way to handle this issue ? 

Thanks.

 

0 Kudos
0 Replies