Select to view content in your preferred language

SwipeWidget and Sublayer

790
1
03-05-2021 09:13 AM
JB19
by
Occasional Contributor

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
1 Reply
angelforero
New Contributor

Hello JB19,

Could you solve your issue? Actually, I have the same doubt with the Swipe widget in react for @arcgis/core 4.23.7 However, If you found some trick to use sublayers in Swipe despite the limitation:

  • There is no current support for GroupLayer in the leadingLayers or trailingLayers.

please tell me.

Thanks in  advance

0 Kudos