The LayerList widget in 3.15 has some additional functionality, including showing the legend. However, the legend doesn't get updated when the checkbox on a layer is clicked. It will only update when the map is zoomed in or out. It will not update if the map is panned.
JS Bin - Collaborative JavaScript Debugging
This has been fixed in 3.16
ENH-000092811: Layerlist widget now updates the legend on the toggle of the sub layers.
Yes, I have called it in. Currently, their work-around is to use the toggle event to refresh the widget when a layer is toggled. Unfortunately, this has the side effect of collapsing the LayerList widget every time you toggle a layer.
myWidget.on("toggle", function (){ myWidget.refresh(); });
This doesn't have any effect on the startup issue, though. I tried refreshing the widget when the load event is fired, but that leaves the legend totally empty.
Ken,
I am seeing the same thing. Are you going to call this into Tech Support?
Aangemelde leden kunnen berichten plaatsen, updates volgen en meer. Nieuw hier? Registreer een gratis account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.