<?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: How to get Legend Info from web map services in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-get-legend-info-from-web-map-services/m-p/155574#M14471</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think you simply need to RegEx your URL before sending, replacing FeatureServer with MapServer. Each Feature service will (must) have a matching MapServer.&lt;/P&gt;&lt;P&gt;But - to use your renderer... The 3.x util had a method that would return an SVG suitable for inserting into the browser dom. I was about to port when I realized I could hit the MapServer and get the same results, so I never pursued it. It ran through the JSON and created the&amp;nbsp;image with js. Kinda brute force.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 20 Feb 2017 20:46:57 GMT</pubDate>
    <dc:creator>JordanBaumgardner</dc:creator>
    <dc:date>2017-02-20T20:46:57Z</dc:date>
    <item>
      <title>How to get Legend Info from web map services</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-get-legend-info-from-web-map-services/m-p/155567#M14464</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am creating a custom TOC which needs to have both layer toggle and legend item (image data) for the&amp;nbsp;web map. But the web map service does not have Legend Info. Does anybody know how to get legend info from the web map services. Any help would be very appreciated.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Feb 2017 14:59:43 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-get-legend-info-from-web-map-services/m-p/155567#M14464</guid>
      <dc:creator>DavidZhong2</dc:creator>
      <dc:date>2017-02-17T14:59:43Z</dc:date>
    </item>
    <item>
      <title>Re: How to get Legend Info from web map services</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-get-legend-info-from-web-map-services/m-p/155568#M14465</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you have created a legend, it should be available right on the map service, something like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="https://raster.nationalmap.gov/arcgis/rest/services/SampleWorldCities/MapServer/legend?f=pjson" title="https://raster.nationalmap.gov/arcgis/rest/services/SampleWorldCities/MapServer/legend?f=pjson"&gt;https://raster.nationalmap.gov/arcgis/rest/services/SampleWorldCities/MapServer/legend?f=pjson&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can also create the legend using something like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="https://developers.arcgis.com/javascript/3/jssamples/widget_legend.html" title="https://developers.arcgis.com/javascript/3/jssamples/widget_legend.html"&gt;Legend | ArcGIS API for JavaScript 3.19&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Feb 2017 15:05:57 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-get-legend-info-from-web-map-services/m-p/155568#M14465</guid>
      <dc:creator>ChrisSmith7</dc:creator>
      <dc:date>2017-02-17T15:05:57Z</dc:date>
    </item>
    <item>
      <title>Re: How to get Legend Info from web map services</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-get-legend-info-from-web-map-services/m-p/155569#M14466</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You may find this useful once you get your JSON back from the legend url. &amp;nbsp;[Ripped off from the old 3.x\digit]&lt;/P&gt;&lt;P&gt;/// Key Line&lt;/P&gt;&lt;P&gt;///&amp;nbsp;src = "data:image/png;base64," +&lt;BR /&gt; this.rootLayerTOC._legendResponse.layers[this.rootLayer.layerId].legend[0].imageData;&lt;BR /&gt;///&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;_getLegendIconUrl: function(legend) {
 var src = legend.url;
 if (src == null) {
 src = "data:image/png;base64," +
 this.rootLayerTOC._legendResponse.layers[this.rootLayer.layerId].legend[0].imageData;
 } else if (src != null &amp;amp;&amp;amp; src.indexOf('data') == -1) {
 // in some cases NULL value may cause #legend != #of renderer entry.
 if (!has('ie') &amp;amp;&amp;amp; legend.imageData &amp;amp;&amp;amp; legend.imageData.length &amp;gt; 0) {
 src = "data:image/png;base64," + legend.imageData;
 } else {
 if (src.indexOf('http') !== 0) {
 // resolve relative url
 src = this.rootLayer.url + '/' + this.serviceLayer.id + '/images/' + src;
 }
 if (this.rootLayer.credential &amp;amp;&amp;amp; this.rootLayer.credential.token) {
 src = src + "?token=" + this.rootLayer.credential.token;
 } else if (esriConfig.defaults.io.alwaysUseProxy) {
 src = esriConfig.defaults.io.proxyUrl + "?" + src;
 }
 }
 }
 return src;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 16:06:51 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-get-legend-info-from-web-map-services/m-p/155569#M14466</guid>
      <dc:creator>JordanBaumgardner</dc:creator>
      <dc:date>2021-12-12T16:06:51Z</dc:date>
    </item>
    <item>
      <title>Re: How to get Legend Info from web map services</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-get-legend-info-from-web-map-services/m-p/155570#M14467</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Jordan for the information. But the service I have is a WebMap service which does not have Legend Info JSON. &amp;nbsp;The following is the screenshot of the service. You can see it only has ALL Layers and Tables link, no Legend link&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/325094_pastedImage_1.png" style="width: 398px; height: 538px;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Feb 2017 20:19:32 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-get-legend-info-from-web-map-services/m-p/155570#M14467</guid>
      <dc:creator>DavidZhong2</dc:creator>
      <dc:date>2017-02-17T20:19:32Z</dc:date>
    </item>
    <item>
      <title>Re: How to get Legend Info from web map services</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-get-legend-info-from-web-map-services/m-p/155571#M14468</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Chris for the response. The service I have does not have legend Info. Please see following screenshot.&amp;nbsp;I am creating a TOC having both layers toggles and legend image. I was able to create a one for the map service having the Legend Info. But for the ArcGIS Online Map, I couldn't find a way to get the Legend Info.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Feb 2017 21:07:13 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-get-legend-info-from-web-map-services/m-p/155571#M14468</guid>
      <dc:creator>DavidZhong2</dc:creator>
      <dc:date>2017-02-17T21:07:13Z</dc:date>
    </item>
    <item>
      <title>Re: How to get Legend Info from web map services</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-get-legend-info-from-web-map-services/m-p/155572#M14469</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It's a Feature Service, that's why you are not seeing the legend option, but if you view the properties of each layer you should see the default render in the Drawing Info. &amp;nbsp;You can also see it in the JSON of each layer.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Feb 2017 06:11:13 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-get-legend-info-from-web-map-services/m-p/155572#M14469</guid>
      <dc:creator>FC_Basson</dc:creator>
      <dc:date>2017-02-20T06:11:13Z</dc:date>
    </item>
    <item>
      <title>Re: How to get Legend Info from web map services</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-get-legend-info-from-web-map-services/m-p/155573#M14470</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi I work with david trying to figure this out.&amp;nbsp; For ArcGIS server maps we are querying the legend information and populating a custom widget with the image data that is returned.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We are looking for something similar for webmaps.&amp;nbsp; I know the renderer is there but how do you just dynamically create something that renders the renderer?&amp;nbsp; First attempts required knowledge and specific code for all possible renderer types.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Do you know of a way to write one set of code that does not require switches based on every possible renderer type?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Feb 2017 20:04:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-get-legend-info-from-web-map-services/m-p/155573#M14470</guid>
      <dc:creator>JasonRainwater</dc:creator>
      <dc:date>2017-02-20T20:04:44Z</dc:date>
    </item>
    <item>
      <title>Re: How to get Legend Info from web map services</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-get-legend-info-from-web-map-services/m-p/155574#M14471</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think you simply need to RegEx your URL before sending, replacing FeatureServer with MapServer. Each Feature service will (must) have a matching MapServer.&lt;/P&gt;&lt;P&gt;But - to use your renderer... The 3.x util had a method that would return an SVG suitable for inserting into the browser dom. I was about to port when I realized I could hit the MapServer and get the same results, so I never pursued it. It ran through the JSON and created the&amp;nbsp;image with js. Kinda brute force.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Feb 2017 20:46:57 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-get-legend-info-from-web-map-services/m-p/155574#M14471</guid>
      <dc:creator>JordanBaumgardner</dc:creator>
      <dc:date>2017-02-20T20:46:57Z</dc:date>
    </item>
    <item>
      <title>Re: How to get Legend Info from web map services</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-get-legend-info-from-web-map-services/m-p/155575#M14472</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I should clarify that we are on the 4.x sdk currently on 4.2.&amp;nbsp; Do you know of anything in there that can help?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;From what I understand a webmap (or portal map) doesn't have a "map server".&amp;nbsp; The webmap is like a wrapper around feature layers but it in itself is not a map server so I don't think we can get the same info as we do in a normal map server.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Feb 2017 20:51:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-get-legend-info-from-web-map-services/m-p/155575#M14472</guid>
      <dc:creator>JasonRainwater</dc:creator>
      <dc:date>2017-02-20T20:51:24Z</dc:date>
    </item>
    <item>
      <title>Re: How to get Legend Info from web map services</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-get-legend-info-from-web-map-services/m-p/155576#M14473</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Well, that's kinda the crux of the issue. They have not ported it yet.&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Feb 2017 20:59:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-get-legend-info-from-web-map-services/m-p/155576#M14473</guid>
      <dc:creator>JordanBaumgardner</dc:creator>
      <dc:date>2017-02-20T20:59:42Z</dc:date>
    </item>
    <item>
      <title>Re: How to get Legend Info from web map services</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-get-legend-info-from-web-map-services/m-p/155577#M14474</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Oh - Right. But once the map layers loads, you run through it's collection and pull the SRC url&amp;nbsp;from that. Swap out the FeaturServer for MapServer and your good to make your call.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Feb 2017 21:00:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-get-legend-info-from-web-map-services/m-p/155577#M14474</guid>
      <dc:creator>JordanBaumgardner</dc:creator>
      <dc:date>2017-02-20T21:00:42Z</dc:date>
    </item>
    <item>
      <title>Re: How to get Legend Info from web map services</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-get-legend-info-from-web-map-services/m-p/155578#M14475</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sorry, let me be more clear.&lt;/P&gt;&lt;P&gt;Load your WebMap&amp;nbsp;as usual but listen for the LoadComplete (don't quote me on that exact event name), then run through the Map objects Layer list. Each one will have a source. You can then use that to complete your TOC.&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Feb 2017 21:06:20 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-get-legend-info-from-web-map-services/m-p/155578#M14475</guid>
      <dc:creator>JordanBaumgardner</dc:creator>
      <dc:date>2017-02-20T21:06:20Z</dc:date>
    </item>
    <item>
      <title>Re: How to get Legend Info from web map services</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-get-legend-info-from-web-map-services/m-p/155579#M14476</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;A WebMap/Portal Map is just a wrapper around "Normal" esri services. Once it loads the Map object will have the actual services that the WebMap is made up of.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Feb 2017 21:08:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-get-legend-info-from-web-map-services/m-p/155579#M14476</guid>
      <dc:creator>JordanBaumgardner</dc:creator>
      <dc:date>2017-02-20T21:08:06Z</dc:date>
    </item>
    <item>
      <title>Re: How to get Legend Info from web map services</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-get-legend-info-from-web-map-services/m-p/155580#M14477</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ok gotcha, so there are urls that are used and populated that might not be visible by clicking around the webmap viewer.&amp;nbsp; I tried digging through there to find what endpoints are available but couldn't find any that surfaced a "map server"&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Feb 2017 21:09:58 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-get-legend-info-from-web-map-services/m-p/155580#M14477</guid>
      <dc:creator>JasonRainwater</dc:creator>
      <dc:date>2017-02-20T21:09:58Z</dc:date>
    </item>
    <item>
      <title>Re: How to get Legend Info from web map services</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-get-legend-info-from-web-map-services/m-p/155581#M14478</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Is it best to use the source from the Layer List? &amp;nbsp;If the person who created that web map has made changes to the symbology in the web map, they would not show up in the actual feature service.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Feb 2017 21:46:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-get-legend-info-from-web-map-services/m-p/155581#M14478</guid>
      <dc:creator>SethPatrich2</dc:creator>
      <dc:date>2017-02-20T21:46:00Z</dc:date>
    </item>
    <item>
      <title>Re: How to get Legend Info from web map services</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-get-legend-info-from-web-map-services/m-p/155582#M14479</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes, there are some key URL that everyone just kinda knows.&lt;/P&gt;&lt;P&gt;Try looking in YourServer\arcgis\rest\services &amp;nbsp; &amp;lt;- that should be the base url&amp;nbsp;to your services.&lt;/P&gt;&lt;P&gt;YourServer:6080\arcgis\manager &amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;YourServer:6080\arcgis\admin&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;are also useful.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Feb 2017 17:58:32 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-get-legend-info-from-web-map-services/m-p/155582#M14479</guid>
      <dc:creator>JordanBaumgardner</dc:creator>
      <dc:date>2017-02-22T17:58:32Z</dc:date>
    </item>
    <item>
      <title>Re: How to get Legend Info from web map services</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-get-legend-info-from-web-map-services/m-p/155583#M14480</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;So I tried this.&amp;nbsp; let me know if this is what you were talking about.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have &lt;A href="https://services.arcgis.com/7qDWTH3pTiLOFaZS/arcgis/rest/services/TTEnergov/FeatureServer/0"&gt;&lt;SPAN style="color: #0066cc; text-decoration: underline;"&gt;https://services.arcgis.com/somekey/arcgis/rest/services/myname/FeatureServer/0&lt;/SPAN&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried changing to &lt;A href="https://services.arcgis.com/7qDWTH3pTiLOFaZS/arcgis/rest/services/TTEnergov/FeatureServer/0"&gt;&lt;SPAN style="color: #0066cc; text-decoration: underline;"&gt;https://services.arcgis.com/somekey/arcgis/rest/services/myname/MapServer/0&lt;/SPAN&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I get invalid url.&amp;nbsp; Or is the url in the src after the layer loads different than this?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Feb 2017 12:36:58 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-get-legend-info-from-web-map-services/m-p/155583#M14480</guid>
      <dc:creator>JasonRainwater</dc:creator>
      <dc:date>2017-02-23T12:36:58Z</dc:date>
    </item>
    <item>
      <title>Re: How to get Legend Info from web map services</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-get-legend-info-from-web-map-services/m-p/155584#M14481</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I would have expected that to work. It worked on my servers.&lt;/P&gt;&lt;P&gt;Try dropping the layer ID&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/services.arcgis.com/somekey/arcgis/rest/services/myname/MapServer&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;/services.arcgis.com/somekey/arcgis/rest/services/myname/&lt;/SPAN&gt;MapServer?f=json&lt;/P&gt;&lt;P&gt;will return&amp;nbsp;the info in a code readable format.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;/services.arcgis.com/somekey/arcgis/rest/services/myname/&lt;/SPAN&gt;/MapServer/legend &amp;nbsp; or &amp;nbsp;&amp;nbsp;/MapServer/legend?f=json&lt;/P&gt;&lt;P&gt;should get you what you are after&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Common esri rest params&lt;/P&gt;&lt;P&gt;f= Return Format [HTML | JSON | PJSON | more I can't remember ]&lt;/P&gt;&lt;P&gt;token= &amp;nbsp;for secure services - go to "generate token" and add to your calls&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Feb 2017 14:28:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-get-legend-info-from-web-map-services/m-p/155584#M14481</guid>
      <dc:creator>JordanBaumgardner</dc:creator>
      <dc:date>2017-02-23T14:28:16Z</dc:date>
    </item>
    <item>
      <title>Re: How to get Legend Info from web map services</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-get-legend-info-from-web-map-services/m-p/155585#M14482</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Oh, and Yes. The URL that loads could be different from the container document (the portal/web map). It is a collection of regular map services. So the Web Map url&amp;nbsp;might be different from its contents.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm getting nervous that I sound more authoritative than I feel. The Portal stuff is still pretty new to me.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But I do know that once a layer is loaded, there is a proper URL to it's no kidding source.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Feb 2017 14:36:07 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-get-legend-info-from-web-map-services/m-p/155585#M14482</guid>
      <dc:creator>JordanBaumgardner</dc:creator>
      <dc:date>2017-02-23T14:36:07Z</dc:date>
    </item>
    <item>
      <title>Re: How to get Legend Info from web map services</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-get-legend-info-from-web-map-services/m-p/155586#M14483</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I tried &lt;A href="https://services.arcgis.com/thekey/arcgis/rest/services/myname/MapServer"&gt;https://services.arcgis.com/thekey/arcgis/rest/services/myname/MapServer&lt;/A&gt;&amp;nbsp;and I'm still getting invalid url.&amp;nbsp; but these are urls I'm pulling through digging down into the info of the webmap.&amp;nbsp; I'm going to debug and pull some real resolved urls out and test them&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Feb 2017 14:42:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-get-legend-info-from-web-map-services/m-p/155586#M14483</guid>
      <dc:creator>JasonRainwater</dc:creator>
      <dc:date>2017-02-23T14:42:00Z</dc:date>
    </item>
  </channel>
</rss>

