Select to view content in your preferred language

Layer Types for SubLayers

180
0
03-04-2024 07:22 AM
jjgarrett0
Occasional Contributor

In the Sublayer class docs the type property says that the value is always 'sublayer' but in the Layer class 'sublayer' does not exist in the possible values list. I'm trying to figure out why that is the case or if it is a mistake? I am writing some conditional logic to verify if the layer.type === 'sublayer' but it causes me typescript issues unless I cast the layer to any. I understand that Sublayer is not a Subclass of Layer but I guess my question is why?

 

https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-Layer.html#type

https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-Sublayer.html#type

0 Kudos
0 Replies