//New imports needed import spark.primitives.BitmapImage; import mx.graphics.ImageSnapshot; //Add this new public function public function exportImage():BitmapImage { var bmpLegend:BitmapData = ImageSnapshot.captureBitmapData(legendDataGroup); var printImg:BitmapImage = new BitmapImage(); printImg.smooth = true; printImg.source = bmpLegend; return printImg; } //Also the LegendDatGroup needs an Id <Legend:LegendDataGroup id="legendDataGroup" dataProvider="{legendAC}">
Angemeldete Mitglieder können Beiträge verfassen, Updates folgen und mehr. Neu hier? Registriere ein kostenloses Konto.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.