<?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 Get the symbol renderer information for a dynamic layer in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/get-the-symbol-renderer-information-for-a-dynamic/m-p/154099#M14375</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi there,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This seems like a simple question, but has me stumped! I would like to get a handle to the symbol renderer information for a layer published in a JSAPI application. Exactly what I want to do is shown when viewing a layer in the ArcGIS Services Directory - for point layers, it shows a bitmap of the symbol (marker symbols), for lines and polygons e.g.:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Renderer: &lt;BR /&gt;Simple Renderer: &lt;BR /&gt;Symbol: &lt;BR /&gt;Simple Fill Symbol:&lt;BR /&gt;Style: esriSFSSolid, Color: [Undefined]&lt;BR /&gt;Outline: &lt;BR /&gt;Simple Line Symbol:&lt;BR /&gt;Style: esriSLSSolid, Color: [230, 0, 0, 255], Width: 3&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I can see that information is stored as a Renderer object but that is as far as I can tell (a) only exposed to Feature Layers and (b) not seem to have a "get" function of any description.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I need this information to help construct a custom TOC/Legend tool that shows all the information above along with a checkbox for visibility (and an opacity button in future).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Any help would be great!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Richard.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 09 Feb 2011 11:46:15 GMT</pubDate>
    <dc:creator>RichardKaufholz</dc:creator>
    <dc:date>2011-02-09T11:46:15Z</dc:date>
    <item>
      <title>Get the symbol renderer information for a dynamic layer</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/get-the-symbol-renderer-information-for-a-dynamic/m-p/154099#M14375</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi there,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This seems like a simple question, but has me stumped! I would like to get a handle to the symbol renderer information for a layer published in a JSAPI application. Exactly what I want to do is shown when viewing a layer in the ArcGIS Services Directory - for point layers, it shows a bitmap of the symbol (marker symbols), for lines and polygons e.g.:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Renderer: &lt;BR /&gt;Simple Renderer: &lt;BR /&gt;Symbol: &lt;BR /&gt;Simple Fill Symbol:&lt;BR /&gt;Style: esriSFSSolid, Color: [Undefined]&lt;BR /&gt;Outline: &lt;BR /&gt;Simple Line Symbol:&lt;BR /&gt;Style: esriSLSSolid, Color: [230, 0, 0, 255], Width: 3&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I can see that information is stored as a Renderer object but that is as far as I can tell (a) only exposed to Feature Layers and (b) not seem to have a "get" function of any description.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I need this information to help construct a custom TOC/Legend tool that shows all the information above along with a checkbox for visibility (and an opacity button in future).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Any help would be great!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Richard.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Feb 2011 11:46:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/get-the-symbol-renderer-information-for-a-dynamic/m-p/154099#M14375</guid>
      <dc:creator>RichardKaufholz</dc:creator>
      <dc:date>2011-02-09T11:46:15Z</dc:date>
    </item>
    <item>
      <title>Re: Get the symbol renderer information for a dynamic layer</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/get-the-symbol-renderer-information-for-a-dynamic/m-p/154100#M14376</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I don't believe this is available yet in anything but a FeatureLayer and ArcGIS Server 10, I believe it is possible to get the symbol information through the soap connection, and therefore build the legend from that... It's not easy, but it can be done... &lt;/SPAN&gt;&lt;A href="http://thunderheadxpler.blogspot.com/2010/07/merging-table-of-content-and-legend.html"&gt;this link shows how&lt;/A&gt;&lt;SPAN&gt;.&amp;nbsp; This functionality will only get better as 10 progresses, 10.1 will make it much easier as well.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 08 Apr 2011 12:44:32 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/get-the-symbol-renderer-information-for-a-dynamic/m-p/154100#M14376</guid>
      <dc:creator>GregSpiridonov</dc:creator>
      <dc:date>2011-04-08T12:44:32Z</dc:date>
    </item>
    <item>
      <title>Re: Get the symbol renderer information for a dynamic layer</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/get-the-symbol-renderer-information-for-a-dynamic/m-p/154101#M14377</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi Greg,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks for your reply. Actually, I have managed to get this by using the REST API - I just had to figure out a whole new language for accessing the json data via a dojo deferred request (esri.request). What I also discovered is that the REST API includes a "Legend resource" which publishes small images (swatch) for each layer in a service. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;At first I created swatches manually using dojo canvas and the renderer info. But after some cross-browser problems I discovered the Legend resource and that seems to work fine (and was easier to build!).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Not something I would volunteer to do again, but certainly is possible!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Cheers,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Richard.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;P.S. I am using v10.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Apr 2011 10:19:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/get-the-symbol-renderer-information-for-a-dynamic/m-p/154101#M14377</guid>
      <dc:creator>RichardKaufholz</dc:creator>
      <dc:date>2011-04-12T10:19:42Z</dc:date>
    </item>
  </channel>
</rss>

