Hello! I'm trying to dynamically add layers to my map in a custom ExB Widget (1.5).
I've followed this to add layers: https://developers.arcgis.com/experience-builder/sample-code/widgets/add-layers/
That works in adding the layer to the map, but that's it. The layer doesn't have an associated JimuLayerView created in the JimuMapView, and also no associated data source.
I found I can call the method createJimuLayerViews() on the JimuMapView, and this creates the JimuLayerView, however, there is still no data source.
If I try to call getLayerDataSource() on the recently create JimuLayerView, it comes back undefined.
Any thoughts/ideas?
Thanks!
Alejandro