Hi Team,
In ExpBuilder, in Data tab, I have added a webmap and used it as source for map widget. And in our custom widgets, we are trying to access the datasources of every layer (our webmap has group layers, sub layers, feature layers). However, the datasource objects of all layers are undefined. And DatasourceManagerInstance::datasources has only one object which is datasource of WebMap.
Here is the snippet Im using to retrieve instance of datasource of layers. Always getting the 'Data source object is undefined.'. How can we fix this.
Another point, if we use function 'getOrCreateLayerDataSource' on JimuLayerView, its creating a datasource instance but this instance is different and the datasource instance used by OOTB widgets of ExpB for eg., Select widget is different.