I want to place a legend div that I'm creating using the Legend widget in a HTML div that is not a child of the "viewDiv" element. Is this even possible? I really don't want to have a legend item floating around in my map div.
I have included a sample CodePen below for reference. I want the legend to go in the "sidebar" element.
https://codepen.io/janzagar0/pen/dPyjeYR