I'm creating FeatureLayers with ArcGISRuntime.createObject("FeatureLayer"). Then I fill the layers feature Table with information from an offline geodatabase by geodatabaseFeatureTableByLayerId(i). Afterwards I add them to my Map by addLayer.
My Problem is that I now want to access layers legend list to get their legendItems image. (layer.legend.legendItems.image) To ensure that all layers are constructed I wait until all Layers are displayed and then I click a button which runs a function to get the images of my layers. Console output said that there is no legend added to my FeatureLayer(ArcGIS.Runtime.Layer: class QQmlListProperty<class QmlLayerLegendInfo> __cdecl QmlLayer::legend(void) count= 0) but I think that there should be one because the layers get displayed in different colors.
Don't know if this is a bug or if I just did smth. wrong. My target is to get the layers color or image information to display it in a legend.