<?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 in ArcGIS API for Flex Questions</title>
    <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/dynamic-legend/m-p/666383#M14959</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;danj,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; Here is a link to a Dynamic Legend Widget for the FlexViewer2.0 that utilizes the createSwatch method so even if you are not using the FlexViewer2.0 you can still look at my code and see how to do it for yourself.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://www.arcgis.com/home/item.html...b557bf64136af6"&gt;http://www.arcgis.com/home/item.html...b557bf64136af6&lt;/A&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 24 Aug 2010 23:07:38 GMT</pubDate>
    <dc:creator>RobertScheitlin__GISP</dc:creator>
    <dc:date>2010-08-24T23:07:38Z</dc:date>
    <item>
      <title>Dynamic Legend</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/dynamic-legend/m-p/666382#M14958</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;In reviewing the information available on this forum it seems that the promise of dynamic legends is achievable using the new createSwatch() method. However, I am having trouble getting a handle on the symbols used by the map service. Of course defining the symbol programatically would not be dynamic, it must come from the map service. This seems to be a little more tricky, at least for me. Can anyone point me in the right direction or provide an example?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;-Dan&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 Aug 2010 21:45:04 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/dynamic-legend/m-p/666382#M14958</guid>
      <dc:creator>DanJensen</dc:creator>
      <dc:date>2010-08-24T21:45:04Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic Legend</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/dynamic-legend/m-p/666383#M14959</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;danj,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; Here is a link to a Dynamic Legend Widget for the FlexViewer2.0 that utilizes the createSwatch method so even if you are not using the FlexViewer2.0 you can still look at my code and see how to do it for yourself.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://www.arcgis.com/home/item.html...b557bf64136af6"&gt;http://www.arcgis.com/home/item.html...b557bf64136af6&lt;/A&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 Aug 2010 23:07:38 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/dynamic-legend/m-p/666383#M14959</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2010-08-24T23:07:38Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic Legend</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/dynamic-legend/m-p/666384#M14960</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;OK let's start with these two points.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Mr. Scheitlin mentioned his widget requires ArcGIS Server 10.&amp;nbsp; I soppose this is because earlier versions of AGS do not return objects necessary to use the createSwatch function.&amp;nbsp; I noticed when trying to implement my own code that drawingInfo returns null.&amp;nbsp; My suspicion is that ArcGIS Server 9.3.1 can not return a DrawingInfo object which means people like myself cannot use createSwatch on map service layers until we upgrade.&amp;nbsp; Can anyone confirm my suspicion?&amp;nbsp; If that is the case what are the alternatives?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Second, I am not knowlegable enough to understand this line of code from Mr. Scheitlin's example.&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_macro_code jive_text_macro"&gt;ArcGISDynamicMapServiceLayer(layer).addEventListener(DetailsEvent.GET_ALL_DETAILS_COMPLETE,function(event:DetailsEvent):void{getAllDetailsResult(event,lname)});&lt;/PRE&gt;&lt;BR /&gt;&lt;SPAN&gt;Could someone please break this down for me?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Much appreciated,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;-Dan&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Aug 2010 16:03:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/dynamic-legend/m-p/666384#M14960</guid>
      <dc:creator>DanJensen</dc:creator>
      <dc:date>2010-08-25T16:03:15Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic Legend</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/dynamic-legend/m-p/666385#M14961</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Dan,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; Yep, you need ArcGIS Server 10 to use drawingInfos.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Let's break down what this line is doing&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_macro_code jive_text_macro"&gt;ServiceLayer(layer).addEventListener(DetailsEvent.GET_ALL_DETAILS_COMPLETE,function(event:DetailsEvent):void{getAllDetailsResult(event,lname)});&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Basically I am adding an event listener to the layer that is listening for the GET_ALLDETAILS_COMPLETE event.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The GET_ALLDETAILS_COMPLETE is needed to get the layerDetails objects from all the layers in the map service for that layer, because LayerDetails is where drawinginfos come from.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;So once the event is fired I launch a function called getAllDetailsResult and pass is not only the results of the GET_ALLDETAILS_COMPLETE but also a variable called lname. This inline function trick is what developers use when they want a send something along with the original event dispatcher.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Aug 2010 16:31:43 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/dynamic-legend/m-p/666385#M14961</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2010-08-25T16:31:43Z</dc:date>
    </item>
  </channel>
</rss>

