//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}">
Membros conectados podem postar, seguir atualizações e mais. Novo aqui? Registre uma conta gratuita.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.