Two data sources for a UI component


What is the recommandation to declare a new data source parameter in addition to the “data” field?
I need to setup a UIViewMap with location data source and an additional collection that represents pipe network.


Looking at the base type for C3 UI components UIViewComponent the field data accepts a json.

In your case, you can pass this second data source with a second key:

"data": {
  "collection": "main-data-source",
  "network": "pipe-network-data-source"

Then use this second dataSource in the map addLayers function (where the markers are drawn).


thanks @bachr this is working as expected.