I am creating a number of kml layers and adding them async to my map. The problem is, is that I can't figure out how to create their legend info so that they can be displayed on my legend to the map. I want to do something like this, but can't figure out how to get anything to work at all. i know I need to add to the legendinfos of the layer or the map itself, but hit a roadblock.
This append below doesn't work at all, but shows what I am trying to do.
var newKMLLayer = ArcGISRuntimeEnvironment.createObject("KmlLayer",