<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Dynamic Legend, Multiple LayerList and Printing in ArcGIS API for Flex Questions</title>
    <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/dynamic-legend-multiple-layerlist-and-printing/m-p/755052#M16662</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Ian,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Yes you are right on track with what you are trying to do. Let me tell you if you are not an experienced developer than what you are attempting is going to be very difficult. In ArcMap it is easy to add a legend, resize it, force new columns, etc. because it is an actual com object.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 27 Sep 2010 13:03:17 GMT</pubDate>
    <dc:creator>RobertScheitlin__GISP</dc:creator>
    <dc:date>2010-09-27T13:03:17Z</dc:date>
    <item>
      <title>Dynamic Legend, Multiple LayerList and Printing</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/dynamic-legend-multiple-layerlist-and-printing/m-p/755049#M16659</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I have been trying to create multiple LayerLists in order to categorise my data into ISO categories, and using the Dynamic Legend from Robert to display the combined content of the LayerLIsts and printing (hoping that the legend would be printed too).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Initially I tried duplicating the widget with another name and config file (I got a a 2036 error - cannot load). Then I just created multiple config files with the one "instance" of LayerList. This indeed created multiple Layerlists with configurable content. So far so good.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;To my great delight the Dynamic legend seems to be working in this scenario. (I am guessing it is because I have the More ... mapswitcher on?). My problem really comes when I want to print. The legend does not appear in the print.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I was wondering what could be done about this. Is there a way of converting the dynamic legend to a "static" legend (i.e. an image) in the print process?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks in advance&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Ian&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 26 Sep 2010 09:16:37 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/dynamic-legend-multiple-layerlist-and-printing/m-p/755049#M16659</guid>
      <dc:creator>IanHamilton</dc:creator>
      <dc:date>2010-09-26T09:16:37Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic Legend, Multiple LayerList and Printing</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/dynamic-legend-multiple-layerlist-and-printing/m-p/755050#M16660</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Ian,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; I will push out a new version with a public exportImage function soon but until then here is what you would need to add.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
//New imports needed
import spark.primitives.BitmapImage;
import mx.graphics.ImageSnapshot;

//Add this new public function
&amp;nbsp;&amp;nbsp; public function exportImage():BitmapImage
&amp;nbsp;&amp;nbsp; {
&amp;nbsp;&amp;nbsp;&amp;nbsp; var bmpLegend:BitmapData = ImageSnapshot.captureBitmapData(legendDataGroup);
&amp;nbsp;&amp;nbsp;&amp;nbsp; var printImg:BitmapImage = new BitmapImage();
&amp;nbsp;&amp;nbsp;&amp;nbsp; printImg.smooth = true;
&amp;nbsp;&amp;nbsp;&amp;nbsp; printImg.source = bmpLegend;
&amp;nbsp;&amp;nbsp;&amp;nbsp; return printImg;
&amp;nbsp;&amp;nbsp; }
//Also the LegendDatGroup needs an Id
&amp;lt;Legend:LegendDataGroup id="legendDataGroup" dataProvider="{legendAC}"&amp;gt;
&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 08:02:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/dynamic-legend-multiple-layerlist-and-printing/m-p/755050#M16660</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2021-12-12T08:02:00Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic Legend, Multiple LayerList and Printing</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/dynamic-legend-multiple-layerlist-and-printing/m-p/755051#M16661</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks Robert,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I am hoping to get into coding FLEX soon, so I have not yet been concentrating on it.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Am I right in thinking this code goes in your Legend and I'll need to call the function from a modified Print function somewhere?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I would also like to reduce the font/patch sizes in the legend. I couldn't find a setting for this.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;It looks like I'll have to start looking at code much more!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks again, Ian&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Sep 2010 01:44:52 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/dynamic-legend-multiple-layerlist-and-printing/m-p/755051#M16661</guid>
      <dc:creator>IanHamilton</dc:creator>
      <dc:date>2010-09-27T01:44:52Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic Legend, Multiple LayerList and Printing</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/dynamic-legend-multiple-layerlist-and-printing/m-p/755052#M16662</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Ian,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Yes you are right on track with what you are trying to do. Let me tell you if you are not an experienced developer than what you are attempting is going to be very difficult. In ArcMap it is easy to add a legend, resize it, force new columns, etc. because it is an actual com object.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Sep 2010 13:03:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/dynamic-legend-multiple-layerlist-and-printing/m-p/755052#M16662</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2010-09-27T13:03:17Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic Legend, Multiple LayerList and Printing</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/dynamic-legend-multiple-layerlist-and-printing/m-p/755053#M16663</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi Robert,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;In a previous life I was a developer but I don't underestimate what I might need to learn.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;In any case if you are going to solve my legend problem that would be great!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I did notice some behavour of your legend that I though&amp;nbsp; you might like to know about.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If a layer list is opened first and then the legend no visible layers show up in the legend. I expect there is an event you could pick up for this or a list active layers you can access to initialise the legend?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Sep 2010 11:46:37 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/dynamic-legend-multiple-layerlist-and-printing/m-p/755053#M16663</guid>
      <dc:creator>IanHamilton</dc:creator>
      <dc:date>2010-09-28T11:46:37Z</dc:date>
    </item>
  </channel>
</rss>

