//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}">
Signed in members can post, follow updates, and more. New here? Register a free account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.