<?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: Incorrect sample code for labelling in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/incorrect-sample-code-for-labelling/m-p/1575108#M86367</link>
    <description>&lt;P&gt;That is a reasonable design. Thanks for your great assistance.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 13 Jan 2025 21:15:21 GMT</pubDate>
    <dc:creator>TedZhou</dc:creator>
    <dc:date>2025-01-13T21:15:21Z</dc:date>
    <item>
      <title>Incorrect sample code for labelling</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/incorrect-sample-code-for-labelling/m-p/1575071#M86362</link>
      <description>&lt;P&gt;The sample code&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://developers.arcgis.com/javascript/latest/sample-code/layers-subtypegrouplayer/" target="_blank" rel="noopener"&gt;https://developers.arcgis.com/javascript/latest/sample-code/layers-subtypegrouplayer/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;seems to be incorrect.&lt;/P&gt;&lt;P&gt;If we change :&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; item.layer.labelsVisible = true&lt;/SPAN&gt;&lt;SPAN&gt;;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;the labels are shown as below:&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="TedZhou_0-1736800464112.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/123255iFCB6C1D130F163B4/image-size/medium?v=v2&amp;amp;px=400" role="button" title="TedZhou_0-1736800464112.png" alt="TedZhou_0-1736800464112.png" /&gt;&lt;/span&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;ArcGIS users as us intend to learn what the following expression exactly means from ArcGIS team actually.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; labelExpression: &lt;/SPAN&gt;&lt;SPAN&gt;"$feature.assetgroup"&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;The sample code just confused me.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;ArcGIS team did great work.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 13 Jan 2025 20:39:20 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/incorrect-sample-code-for-labelling/m-p/1575071#M86362</guid>
      <dc:creator>TedZhou</dc:creator>
      <dc:date>2025-01-13T20:39:20Z</dc:date>
    </item>
    <item>
      <title>Re: Incorrect sample code for labelling</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/incorrect-sample-code-for-labelling/m-p/1575096#M86363</link>
      <description>&lt;P&gt;I think what the sample is doing is showing how to do different things with the layers. If you click the gear icon on a layer, the "Labels" button will show or hide the labels and the "unique" button will symbolize the data with a simple renderer or a unique-value renderer.&lt;/P&gt;&lt;P&gt;The labelExpression seems to be a mistake. If you replace that line with&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;labelExpressionInfo: {
  expression: "$feature.assetgroup"
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;the labels show unique information&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Snag_1b43a60.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/123268iBA9ABE6B146C5537/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Snag_1b43a60.png" alt="Snag_1b43a60.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;If you find errors in the sample code, it's more helpful to give feedback directly to Esri about this. To do that, scroll to the bottom of the page and click the thumbs down icon. This will bring up a dialog to send a message to the team.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Snag_1b63fc5.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/123270i5919D118467CA386/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Snag_1b63fc5.png" alt="Snag_1b63fc5.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;</description>
      <pubDate>Mon, 13 Jan 2025 21:03:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/incorrect-sample-code-for-labelling/m-p/1575096#M86363</guid>
      <dc:creator>KenBuja</dc:creator>
      <dc:date>2025-01-13T21:03:14Z</dc:date>
    </item>
    <item>
      <title>Re: Incorrect sample code for labelling</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/incorrect-sample-code-for-labelling/m-p/1575103#M86364</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for your time and kind efforts.&lt;/P&gt;</description>
      <pubDate>Mon, 13 Jan 2025 21:12:27 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/incorrect-sample-code-for-labelling/m-p/1575103#M86364</guid>
      <dc:creator>TedZhou</dc:creator>
      <dc:date>2025-01-13T21:12:27Z</dc:date>
    </item>
    <item>
      <title>Re: Incorrect sample code for labelling</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/incorrect-sample-code-for-labelling/m-p/1575105#M86365</link>
      <description>&lt;P&gt;After a little more testing, you can also change it to this to get the same result&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;labelExpression: "[assetgroup]"&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 13 Jan 2025 21:14:04 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/incorrect-sample-code-for-labelling/m-p/1575105#M86365</guid>
      <dc:creator>KenBuja</dc:creator>
      <dc:date>2025-01-13T21:14:04Z</dc:date>
    </item>
    <item>
      <title>Re: Incorrect sample code for labelling</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/incorrect-sample-code-for-labelling/m-p/1575108#M86367</link>
      <description>&lt;P&gt;That is a reasonable design. Thanks for your great assistance.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 13 Jan 2025 21:15:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/incorrect-sample-code-for-labelling/m-p/1575108#M86367</guid>
      <dc:creator>TedZhou</dc:creator>
      <dc:date>2025-01-13T21:15:21Z</dc:date>
    </item>
  </channel>
</rss>

