<?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: Retrieving legend symbol info from a service that has no legend in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/retrieving-legend-symbol-info-from-a-service-that/m-p/474483#M44010</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks Ken.&amp;nbsp; I'd read that and figured that was the issue.&amp;nbsp; My next question then, how does the legend dijit request the legend information from services hosted on older versions of ArcServer?&amp;nbsp; If I use the legend dijit everything shows up fine, so there's a successful request being made somewhere.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 19 Feb 2014 18:38:32 GMT</pubDate>
    <dc:creator>BrettGreenfield__DNR_</dc:creator>
    <dc:date>2014-02-19T18:38:32Z</dc:date>
    <item>
      <title>Retrieving legend symbol info from a service that has no legend</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/retrieving-legend-symbol-info-from-a-service-that/m-p/474481#M44008</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;&lt;SPAN&gt;I'm working on developing a custom legend for a webmap of ours by using esri.request to retrieve JSON information about the legend symbol and dynamically creating it for each of the layers in my map.&amp;nbsp; This works fine for our services: I sent the request to &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;mapservice&amp;gt;/legend, and I get the appropriate response.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;However, this particular map is also using a few services from an external source, and when I visit the URL for those services, there's no link to "legend", and if I manually add "/legend" to the end of the service URL, I get an error saying Invalid URL.&amp;nbsp; The URL to one of the services in question is here: &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://mdewin25.mde.state.md.us/ArcGIS/rest/services/Maryland_Shellfish_Closure_Areas/MapServer" rel="nofollow" target="_blank"&gt;http://mdewin25.mde.state.md.us/ArcGIS/rest/services/Maryland_Shellfish_Closure_Areas/MapServer&lt;/A&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Is there a way to retrieve the legend symbol information from this service?&amp;nbsp; I'm concerned I'm going to have to just take screen shots of the legend symbols, save them as images, and add those to the map...I really don't want to have to do that.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Feb 2014 17:49:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/retrieving-legend-symbol-info-from-a-service-that/m-p/474481#M44008</guid>
      <dc:creator>BrettGreenfield__DNR_</dc:creator>
      <dc:date>2014-02-19T17:49:11Z</dc:date>
    </item>
    <item>
      <title>Re: Retrieving legend symbol info from a service that has no legend</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/retrieving-legend-symbol-info-from-a-service-that/m-p/474482#M44009</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I don't think you have that option on this service. It was created in 9.3.1 (click on the Home link to see this) and it looks like the Legend resource capability was only added in 10.0, SP 1. Take a look at the &lt;/SPAN&gt;&lt;A href="http://resources.arcgis.com/en/help/rest/apiref/"&gt;What's New&lt;/A&gt;&lt;SPAN&gt; page for the Rest API&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Feb 2014 18:35:43 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/retrieving-legend-symbol-info-from-a-service-that/m-p/474482#M44009</guid>
      <dc:creator>KenBuja</dc:creator>
      <dc:date>2014-02-19T18:35:43Z</dc:date>
    </item>
    <item>
      <title>Re: Retrieving legend symbol info from a service that has no legend</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/retrieving-legend-symbol-info-from-a-service-that/m-p/474483#M44010</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks Ken.&amp;nbsp; I'd read that and figured that was the issue.&amp;nbsp; My next question then, how does the legend dijit request the legend information from services hosted on older versions of ArcServer?&amp;nbsp; If I use the legend dijit everything shows up fine, so there's a successful request being made somewhere.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Feb 2014 18:38:32 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/retrieving-legend-symbol-info-from-a-service-that/m-p/474483#M44010</guid>
      <dc:creator>BrettGreenfield__DNR_</dc:creator>
      <dc:date>2014-02-19T18:38:32Z</dc:date>
    </item>
    <item>
      <title>Re: Retrieving legend symbol info from a service that has no legend</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/retrieving-legend-symbol-info-from-a-service-that/m-p/474484#M44011</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;&lt;SPAN&gt;Okay, looks like I figured it out.&amp;nbsp; I watched the requests made as I loaded a page that used the legend dijit via Firebug and found I can make the request to the service if I add "&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://utility.arcgis.com/sharing/tools/legend?soapUrl=" rel="nofollow" target="_blank"&gt;http://utility.arcgis.com/sharing/tools/legend?soapUrl=&lt;/A&gt;&lt;SPAN&gt;" before the URL to the actual service.&amp;nbsp; Tested it and this seems to work.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Feb 2014 18:45:38 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/retrieving-legend-symbol-info-from-a-service-that/m-p/474484#M44011</guid>
      <dc:creator>BrettGreenfield__DNR_</dc:creator>
      <dc:date>2014-02-19T18:45:38Z</dc:date>
    </item>
    <item>
      <title>Re: Retrieving legend symbol info from a service that has no legend</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/retrieving-legend-symbol-info-from-a-service-that/m-p/474485#M44012</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Glad to hear you found a solution. You should mark your post as the answer.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Feb 2014 18:59:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/retrieving-legend-symbol-info-from-a-service-that/m-p/474485#M44012</guid>
      <dc:creator>KenBuja</dc:creator>
      <dc:date>2014-02-19T18:59:53Z</dc:date>
    </item>
    <item>
      <title>Re: Retrieving legend symbol info from a service that has no legend</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/retrieving-legend-symbol-info-from-a-service-that/m-p/474486#M44013</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi :)...hoping you could complete your thought on retrieving the legend symbol from the server, this is the closest answer I've found in the threads so far! When using esri/request to get legend info in json, how do you then use the url to get the actual image off the server? &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;var legendImageRequest = esriRequest({
 url : "https://www.server.com/arcgis2/rest/services/test/test/MapServer/legend",
 content : {f : "json"},
 handleAs : "json",
});
legendImageRequest.then(function(response) {
 console.log(response.layers[0].legend[0]);
});&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 20:58:38 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/retrieving-legend-symbol-info-from-a-service-that/m-p/474486#M44013</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2021-12-11T20:58:38Z</dc:date>
    </item>
    <item>
      <title>Re: Retrieving legend symbol info from a service that has no legend</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/retrieving-legend-symbol-info-from-a-service-that/m-p/474487#M44014</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;&lt;SPAN&gt;Got it, sorry, needed to add 'images' to the api call with the image url: "&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://www.server.com/arcgis2/rest/services/test/test/MapServer/0/images/8674387q2" rel="nofollow" target="_blank"&gt;https://www.server.com/arcgis2/rest/services/test/test/MapServer/0/images/8674387q2&lt;/A&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 Jun 2014 23:07:23 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/retrieving-legend-symbol-info-from-a-service-that/m-p/474487#M44014</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2014-06-26T23:07:23Z</dc:date>
    </item>
  </channel>
</rss>

