<?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: Dynamic Placement of Polygon Labels in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/dynamic-placement-of-polygon-labels/m-p/1627725#M87303</link>
    <description>&lt;P&gt;Chiming in...&lt;/P&gt;&lt;P&gt;Facing the same limitation. As suggested in:&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/road-map-for-repeating-labels-for-polygons/m-p/1626169#M87277" target="_blank"&gt;https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/road-map-for-repeating-labels-for-polygons/m-p/1626169#M87277&lt;/A&gt;&lt;/P&gt;&lt;P&gt;I created an idea:&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.esri.com/t5/arcgis-javascript-maps-sdk-ideas/add-support-for-repeating-labels-for-polygons/idi-p/1627722/jump-to/first-unread-message" target="_blank"&gt;https://community.esri.com/t5/arcgis-javascript-maps-sdk-ideas/add-support-for-repeating-labels-for-polygons/idi-p/1627722/jump-to/first-unread-message&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Feel free to promote it with kudos !&lt;/P&gt;</description>
    <pubDate>Fri, 27 Jun 2025 11:33:37 GMT</pubDate>
    <dc:creator>NicolasGIS</dc:creator>
    <dc:date>2025-06-27T11:33:37Z</dc:date>
    <item>
      <title>Dynamic Placement of Polygon Labels</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/dynamic-placement-of-polygon-labels/m-p/1363034#M83175</link>
      <description>&lt;P&gt;I have a polygon FeatureLayer with labels turned on. The labels appear to be fixed in position at the centroid of the polygon.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="JeffreyThompson2_0-1703084462373.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/89605i0E38C2F146F9F5B6/image-size/medium?v=v2&amp;amp;px=400" role="button" title="JeffreyThompson2_0-1703084462373.png" alt="JeffreyThompson2_0-1703084462373.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I would like them to reposition themselves, so that the label is always visible regardless of the zoom level. So a zoomed in view like this is still labeled.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="JeffreyThompson2_1-1703084584722.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/89606iDD91A574F0D5C613/image-size/medium?v=v2&amp;amp;px=400" role="button" title="JeffreyThompson2_1-1703084584722.png" alt="JeffreyThompson2_1-1703084584722.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Is this supported by the API? According to the documentation, the only polygon label placement option is 'always-horizontal'.&amp;nbsp;&lt;A href="https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-LabelClass.html#labelPlacement" target="_blank"&gt;https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-LabelClass.html#labelPlacement&lt;/A&gt;&lt;/P&gt;&lt;P&gt;This seems like very basic behavior so I'd be surprised if it's not supported. Any suggestions or work-arounds?&lt;/P&gt;</description>
      <pubDate>Wed, 20 Dec 2023 15:12:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/dynamic-placement-of-polygon-labels/m-p/1363034#M83175</guid>
      <dc:creator>JeffreyThompson2</dc:creator>
      <dc:date>2023-12-20T15:12:16Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic Placement of Polygon Labels</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/dynamic-placement-of-polygon-labels/m-p/1363427#M83183</link>
      <description>&lt;P&gt;I am also facing the same issue, trying to fixe the label position dynamically.&lt;/P&gt;&lt;P&gt;Also facing the issue, label text is not displaying correctly in print map. Can anyone suggest .&lt;/P&gt;</description>
      <pubDate>Thu, 21 Dec 2023 05:11:34 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/dynamic-placement-of-polygon-labels/m-p/1363427#M83183</guid>
      <dc:creator>SaurabhUpadhyaya</dc:creator>
      <dc:date>2023-12-21T05:11:34Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic Placement of Polygon Labels</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/dynamic-placement-of-polygon-labels/m-p/1378443#M83570</link>
      <description>&lt;P&gt;I have developed a workaround. The FeatureLayer in my case is created from a MapImageLayer and a MapImageLayer does handle dynamic repositioning. I have used the MapImageLayer to effectively create a layer that only contains labels and loaded it to my map as well as the FeatureLayer which handles all the other attributes on the map.&lt;/P&gt;&lt;P&gt;This creates a MapImageLayer with only the sublayer I want and hides everything but the labels.&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;//Label only mapImageLayer
const mapImage = new MapImageLayer({
   url: 'url',
   listMode: hide,
   sublayers: [
                    {
                        id: 8,
                        legendEnabled: false,
                        listMode: 'hide',
                        opacity: 0
                    }
                ]&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;I gave my FeatureLayer a LabelClass with a labelExpressionInfo of an empty string to trick it into thinking it's doing the labeling.&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;labelClass: [
    {
        labelExpressionInfo: {
            expression: ' '
        },
        symbol: {
            type: 'text',
            color: 'black',
            font: {
                family: 'Noto Sans',
                size: 7,
                weight: 'normal'
            }
        },
        labelPlacement: 'always-horizontal'
    }
]&lt;/LI-CODE&gt;&lt;P&gt;And I used reactiveUtils to turn on/off the MapImageLayer when the layer it is tied to or its labels are turned on/off.&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;sublayer8 = mapImage.findSublayerById(8)
feature8 = jimuMapView.view.map.findLayerById('featureLayer8')
reactiveUtils.watch(() =&amp;gt; [feature8?.visible, feature8?.labelsVisible], ([visible, labels]) =&amp;gt; {
	if (visible &amp;amp;&amp;amp; labels) {
		sublayer8.visible = true
	} else {
		sublayer8.visible = false
	}
})&lt;/LI-CODE&gt;</description>
      <pubDate>Mon, 05 Feb 2024 21:57:13 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/dynamic-placement-of-polygon-labels/m-p/1378443#M83570</guid>
      <dc:creator>JeffreyThompson2</dc:creator>
      <dc:date>2024-02-05T21:57:13Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic Placement of Polygon Labels</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/dynamic-placement-of-polygon-labels/m-p/1627725#M87303</link>
      <description>&lt;P&gt;Chiming in...&lt;/P&gt;&lt;P&gt;Facing the same limitation. As suggested in:&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/road-map-for-repeating-labels-for-polygons/m-p/1626169#M87277" target="_blank"&gt;https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/road-map-for-repeating-labels-for-polygons/m-p/1626169#M87277&lt;/A&gt;&lt;/P&gt;&lt;P&gt;I created an idea:&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.esri.com/t5/arcgis-javascript-maps-sdk-ideas/add-support-for-repeating-labels-for-polygons/idi-p/1627722/jump-to/first-unread-message" target="_blank"&gt;https://community.esri.com/t5/arcgis-javascript-maps-sdk-ideas/add-support-for-repeating-labels-for-polygons/idi-p/1627722/jump-to/first-unread-message&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Feel free to promote it with kudos !&lt;/P&gt;</description>
      <pubDate>Fri, 27 Jun 2025 11:33:37 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/dynamic-placement-of-polygon-labels/m-p/1627725#M87303</guid>
      <dc:creator>NicolasGIS</dc:creator>
      <dc:date>2025-06-27T11:33:37Z</dc:date>
    </item>
  </channel>
</rss>

