<?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: Get Legend Symbol URL in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/get-legend-symbol-url/m-p/400359#M36872</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Obviously you don't need to do that in a browser that is capable of rendering the symbol client-side using the imageData property.&lt;BR /&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;How to do this (in javascript)?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thank you very much.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 18 Sep 2012 07:49:38 GMT</pubDate>
    <dc:creator>demdeberanz</dc:creator>
    <dc:date>2012-09-18T07:49:38Z</dc:date>
    <item>
      <title>Get Legend Symbol URL</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/get-legend-symbol-url/m-p/400357#M36870</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I'm working on a map application using the javascript api and am building a table of contents to provide some custom formatting. I am able to add the layers to the map and build a list of checkboxes using the layer id (or title). However, I can't find a clean example of how to get the url for the layer symbol.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Does anyone know of a good example on how to find the url for a layer's symbol? If I can get the symbol url then I can use innerHTML to display the symbol along with the layer id. The services are hosted on ArcGIS Server 10.0x and Legend is enabled so I can manually navigate to the URL but I need to make this dynamic.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Sep 2012 02:39:47 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/get-legend-symbol-url/m-p/400357#M36870</guid>
      <dc:creator>JustinShepard</dc:creator>
      <dc:date>2012-09-06T02:39:47Z</dc:date>
    </item>
    <item>
      <title>Re: Get Legend Symbol URL</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/get-legend-symbol-url/m-p/400358#M36871</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I don't think there's anything out of the box (unless someones done a TOC with key/legend?) but using the metadata from the service/layer you can build the URI to retrieve the legend symbol - that's all the legend widget does.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Be aware that there's two ways to get the symbol and it depends on a number of factors e.g. browser.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;You can get the actual image data and render on the client or you can request the image from the service on the server.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The legend 'service' is available at:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&lt;A class="jive-link-external-small" href="http://" rel="nofollow" target="_blank"&gt;http://&lt;/A&gt;&lt;SPAN&gt;&amp;lt;your AGS installation&amp;gt;/&amp;lt;your service&amp;gt;/MapServer/legend&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Or if you want the JSON:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&lt;A class="jive-link-external-small" href="http://" rel="nofollow" target="_blank"&gt;http://&lt;/A&gt;&lt;SPAN&gt;&amp;lt;your AGS installation&amp;gt;/&amp;lt;your service&amp;gt;/MapServer/legend?f=json&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;You'll need the second one to build the URI dynamically as you'll need to append the layerId and url properties in order to get the correct symbol back.&amp;nbsp; Obviously you don't need to do that in a browser that is capable of rendering the symbol client-side using the imageData property.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Some documentation here:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://help.arcgis.com/en/arcgisserver/10.0/apis/rest/mslegend.html"&gt;http://help.arcgis.com/en/arcgisserver/10.0/apis/rest/mslegend.html&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;HTH&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;P.S. don't forget about proxies &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Sep 2012 09:07:13 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/get-legend-symbol-url/m-p/400358#M36871</guid>
      <dc:creator>__Rich_</dc:creator>
      <dc:date>2012-09-06T09:07:13Z</dc:date>
    </item>
    <item>
      <title>Re: Get Legend Symbol URL</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/get-legend-symbol-url/m-p/400359#M36872</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Obviously you don't need to do that in a browser that is capable of rendering the symbol client-side using the imageData property.&lt;BR /&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;How to do this (in javascript)?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thank you very much.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Sep 2012 07:49:38 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/get-legend-symbol-url/m-p/400359#M36872</guid>
      <dc:creator>demdeberanz</dc:creator>
      <dc:date>2012-09-18T07:49:38Z</dc:date>
    </item>
  </channel>
</rss>

