<?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 change a layer name in the legend ? in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-change-a-layer-name-in-the-legend/m-p/661058#M61712</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-family: arial,helvetica,sans-serif;"&gt;Indeed&lt;/SPAN&gt;&lt;SPAN style="font-family: terminal,monaco,monospace;"&gt; featureLayer.then(featureLayer.title = "My Title"); &lt;SPAN style="font-family: arial,helvetica,sans-serif;"&gt;works like a charm.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial,helvetica,sans-serif;"&gt;Thanks !&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 29 Aug 2016 13:22:03 GMT</pubDate>
    <dc:creator>MathieuVILLEMONT1</dc:creator>
    <dc:date>2016-08-29T13:22:03Z</dc:date>
    <item>
      <title>How to change a layer name in the legend ?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-change-a-layer-name-in-the-legend/m-p/661056#M61710</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The API Reference state that one can modify the layer name displayed in the legend by specifying a &lt;SPAN style="font-family: terminal,monaco,monospace;"&gt;title&lt;/SPAN&gt; in &lt;SPAN style="font-family: terminal,monaco,monospace;"&gt;layerInfos&lt;/SPAN&gt;.&lt;/P&gt;&lt;P&gt;However when I do so in &lt;A class="link-titled" href="https://developers.arcgis.com/javascript/latest/sample-code/sandbox/sandbox.html?sample=widgets-legend" title="https://developers.arcgis.com/javascript/latest/sample-code/sandbox/sandbox.html?sample=widgets-legend" rel="nofollow noopener noreferrer" target="_blank"&gt;ArcGIS API for JavaScript Sandbox&lt;/A&gt; I don't see any change :&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; legend &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;new&lt;/SPAN&gt; &lt;SPAN class="token class-name"&gt;Legend&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
&amp;nbsp; view&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; view&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
&amp;nbsp; layerInfos&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; layer&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; featureLayer&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; title&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"My new title"&lt;/SPAN&gt;
&amp;nbsp; &lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;
&lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 03:58:27 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-change-a-layer-name-in-the-legend/m-p/661056#M61710</guid>
      <dc:creator>MathieuVILLEMONT1</dc:creator>
      <dc:date>2021-12-12T03:58:27Z</dc:date>
    </item>
    <item>
      <title>Re: How to change a layer name in the legend ?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-change-a-layer-name-in-the-legend/m-p/661057#M61711</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Change the Feature Layer name after loading and before initializing the legend:&lt;/P&gt;&lt;PRE class="language-javascript line-numbers"&gt;&lt;CODE&gt;featureLayer&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;title &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"My Title"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 29 Aug 2016 13:12:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-change-a-layer-name-in-the-legend/m-p/661057#M61711</guid>
      <dc:creator>FC_Basson</dc:creator>
      <dc:date>2016-08-29T13:12:29Z</dc:date>
    </item>
    <item>
      <title>Re: How to change a layer name in the legend ?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-change-a-layer-name-in-the-legend/m-p/661058#M61712</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-family: arial,helvetica,sans-serif;"&gt;Indeed&lt;/SPAN&gt;&lt;SPAN style="font-family: terminal,monaco,monospace;"&gt; featureLayer.then(featureLayer.title = "My Title"); &lt;SPAN style="font-family: arial,helvetica,sans-serif;"&gt;works like a charm.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial,helvetica,sans-serif;"&gt;Thanks !&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 29 Aug 2016 13:22:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-change-a-layer-name-in-the-legend/m-p/661058#M61712</guid>
      <dc:creator>MathieuVILLEMONT1</dc:creator>
      <dc:date>2016-08-29T13:22:03Z</dc:date>
    </item>
  </channel>
</rss>

