<?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 how to include text from json (REST) to a legend? in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-include-text-from-json-rest-to-a-legend/m-p/1229621#M79265</link>
    <description>&lt;P&gt;I'm trying to add a description to a legend. I figured out how to show the legend and how to add the description if it is a plain text. I'm stuck on how to pass the description to the legend. Could anyone help me?&lt;/P&gt;&lt;P&gt;I created a minimal example:&amp;nbsp;&lt;A href="https://codepen.io/nwp_nadja_bernhard/pen/yLEVdZz" target="_blank"&gt;https://codepen.io/nwp_nadja_bernhard/pen/yLEVdZz&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The code in question starts at row 173;&lt;BR /&gt;&lt;SPAN&gt;in the function&amp;nbsp;fetchAsync (row 177) I manage to address the desired text -&amp;gt; desc;&lt;BR /&gt;in the function create_legend (row 204) I manage to add a static text in the desired place "content" -&amp;gt; description - currently commented;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;--&amp;gt; How can I pass the text into the legend content?&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 08 Nov 2022 18:07:26 GMT</pubDate>
    <dc:creator>nadja</dc:creator>
    <dc:date>2022-11-08T18:07:26Z</dc:date>
    <item>
      <title>how to include text from json (REST) to a legend?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-include-text-from-json-rest-to-a-legend/m-p/1229621#M79265</link>
      <description>&lt;P&gt;I'm trying to add a description to a legend. I figured out how to show the legend and how to add the description if it is a plain text. I'm stuck on how to pass the description to the legend. Could anyone help me?&lt;/P&gt;&lt;P&gt;I created a minimal example:&amp;nbsp;&lt;A href="https://codepen.io/nwp_nadja_bernhard/pen/yLEVdZz" target="_blank"&gt;https://codepen.io/nwp_nadja_bernhard/pen/yLEVdZz&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The code in question starts at row 173;&lt;BR /&gt;&lt;SPAN&gt;in the function&amp;nbsp;fetchAsync (row 177) I manage to address the desired text -&amp;gt; desc;&lt;BR /&gt;in the function create_legend (row 204) I manage to add a static text in the desired place "content" -&amp;gt; description - currently commented;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;--&amp;gt; How can I pass the text into the legend content?&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 08 Nov 2022 18:07:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-include-text-from-json-rest-to-a-legend/m-p/1229621#M79265</guid>
      <dc:creator>nadja</dc:creator>
      <dc:date>2022-11-08T18:07:26Z</dc:date>
    </item>
    <item>
      <title>Re: how to include text from json (REST) to a legend?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-include-text-from-json-rest-to-a-legend/m-p/1230085#M79278</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/205210"&gt;@nadja&lt;/a&gt;&amp;nbsp;I think you need to await the response from your fetchAsync() function.&lt;/P&gt;&lt;P&gt;You can check out how I got it to work in this codepen (&amp;nbsp;&lt;A href="https://codepen.io/sagewall/pen/zYaNmMq?editors=0011" target="_blank"&gt;https://codepen.io/sagewall/pen/zYaNmMq?editors=0011&lt;/A&gt; ) .&amp;nbsp; I wrapped the entire script in (async () =&amp;gt; {})() so it would run asynchronously and then just await&amp;nbsp; the fetchAsync response on line 254, and I think it's working with those modifications if I understood the question correctly.&lt;/P&gt;</description>
      <pubDate>Wed, 09 Nov 2022 17:24:04 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-include-text-from-json-rest-to-a-legend/m-p/1230085#M79278</guid>
      <dc:creator>Sage_Wall</dc:creator>
      <dc:date>2022-11-09T17:24:04Z</dc:date>
    </item>
  </channel>
</rss>

