I am loading my map layers at runtime through a custom widget. Everything is configured as desired in Developer Edition 1.12. Now, I am upgrading to 1.14 primarily for the access to the Select Widget and the Add to Table Data Action.
Adding a data layer with the OOTB Add Data widget will make the layer selectable in the Select Widget, but layers loaded from my custom widget are not available in the Select Widget.
How can I get the Select Widget to recognize the added data? Bonus points, if the Map Layers Widget will also show the Add To Table option.
@Wei_Ying Would creating a client side data source be picked up by the Select Widget? https://github.com/Esri/arcgis-experience-builder-sdk-resources/tree/master/widgets/client-side-outp... Can a single widget have multiple output datasources?
Looking through the code for the Add Data Widget I found these lines.
const dataSourcesChangeMessage = new DataSourcesChangeMessage(widgetId, DataSourcesChangeType.Create, dataSources)
MessageManager.getInstance().publishMessage(dataSourcesChangeMessage)
Could publishing a message similar to this trigger the Select Widget to find the layers?
Solved! Go to Solution.
Thanks for providing more details. This is a bug and will be fixed in next release.
This is a documented bug in Experience Builder 1.15. It is not a problem in 1.14.
Hi @JeffreyThompson2 @QunSun
Am developing custom widget like 'AddData'. So is there any solution to fix this? like updating DataSource again or any other methods?
@MohammedHilal_K Currently, the only workaround is to use Developer Edition 1.14 which does not have this bug.
In my custom widget, I'm trying to add multiple layers to the map using the jimuMapView.addOrRemoveDataOnMap(mapData) method. I'm looping through an array and passing mapData to addOrRemoveDataOnMap(). However, the layers are not maintaining the order that I provide.
For example, if the order in my array is [layer1, layer2, layer3], the layers are added to the map in an inconsistent order, like [layer2, layer1, layer3]. Additionally, addOrRemoveDataOnMap does not return a promise, which means I can't use await to control the sequence.
Any suggestions on how to address this issue?
Note: I've also tried passing the complete array to addOrRemoveDataOnMap(mapDatas), but I'm still facing the same issue.
https://community.esri.com/t5/experience-builder-custom-widgets/add-remove-layers-2-0/ta-p/1540096
I dealt with this problem by building a re-ordering function inside a setTimeout() function.
Hi@JeffreyThompson2 @QunSun @YueyangLi @Wei_Ying
When I add a map service in the above context, the popup does not appear. However, the popup works for feature layers and groups. Any help on this?
Note: If the same map service is configured in Map widget while initial load, that time pop up works.
@MohammedHilal_K Are you referring to the data action popup? Most data actions (such as export and add to table) are available only for data sources that support queries. Map service data sources do not support queries in ExB.
@YueyangLi
I am referring to the attribute info popup. The DataActions (export & add to table) are working fine, but when we directly click on the map service, the attribute info popup does not display. I have observed this issue even with the out-of-the-box ‘AddData’ widget as well
@MohammedHilal_K I was able to reproduce the issue and have logged it. Thank you for raising this issue!