<?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: Place 2D polygon labels inside polygon in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/place-2d-polygon-labels-inside-polygon/m-p/619624#M57888</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Dan,&lt;/P&gt;&lt;P&gt;Computers are fast, I would not worry about the recalculation... &lt;IMG src="https://community.esri.com/legacyfs/online/emoticons/happy.png" /&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Still, You can calc one time the x,y of label point and put it in the layer. Then you don't need to recalculate.&lt;/P&gt;&lt;P&gt;Another idea is to check if cetroid or center falls inside the polygon and only if not then calc label point.&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 27 Aug 2018 04:17:01 GMT</pubDate>
    <dc:creator>OrenGal</dc:creator>
    <dc:date>2018-08-27T04:17:01Z</dc:date>
    <item>
      <title>Place 2D polygon labels inside polygon</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/place-2d-polygon-labels-inside-polygon/m-p/619619#M57883</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm about to throw in the towel on this one, but figure I'd ask the question to make sure I'm not missing anything. I've got my JSAPI 4.8 2D WebGL polygon labels working great on a FeatureLayer - fonts, halos, scale sensitivity. What I realize now though is that labels are placed at polygon centroids. Many of my polygons, political districts in this case, are irregularly shaped, so the center falls outside of the polygon. The reason for labeling the polygons is so that users can identify them. I'm afraid the net effect in this case is that districts will be labeled 'wrong', thereby sowing confusion. There would be no way to force the labels back into their respective polygons, right???&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Aug 2018 19:09:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/place-2d-polygon-labels-inside-polygon/m-p/619619#M57883</guid>
      <dc:creator>DanFrey</dc:creator>
      <dc:date>2018-08-21T19:09:46Z</dc:date>
    </item>
    <item>
      <title>Re: Place 2D polygon labels inside polygon</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/place-2d-polygon-labels-inside-polygon/m-p/619620#M57884</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dan, I do not know of anyway to do this in the client side currently. If you can use a MapImageLayer then you can have ArcMap label the polygons for you in your MapService.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Aug 2018 22:04:34 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/place-2d-polygon-labels-inside-polygon/m-p/619620#M57884</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2018-08-21T22:04:34Z</dc:date>
    </item>
    <item>
      <title>Re: Place 2D polygon labels inside polygon</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/place-2d-polygon-labels-inside-polygon/m-p/619621#M57885</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I'm using this&amp;nbsp;&lt;A class="jivelink10" href="https://github.com/GeorgeGardiner/LabelPoint" title="https://github.com/GeorgeGardiner/LabelPoint"&gt;https://github.com/GeorgeGardiner/LabelPoint&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Works well.&lt;/P&gt;&lt;P&gt;Oren&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Aug 2018 13:12:55 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/place-2d-polygon-labels-inside-polygon/m-p/619621#M57885</guid>
      <dc:creator>OrenGal</dc:creator>
      <dc:date>2018-08-22T13:12:55Z</dc:date>
    </item>
    <item>
      <title>Re: Place 2D polygon labels inside polygon</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/place-2d-polygon-labels-inside-polygon/m-p/619622#M57886</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;BTW a live sample :&amp;nbsp;&lt;A class="link-bare" href="https://gisn.tel-aviv.gov.il/iView2js/beta4/index.aspx" title="https://gisn.tel-aviv.gov.il/iView2js/beta4/index.aspx"&gt;https://gisn.tel-aviv.gov.il/iView2js/beta4/index.aspx&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Measure area and the value will be displayed at the best location.&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/420309_pastedImage_1.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Aug 2018 14:00:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/place-2d-polygon-labels-inside-polygon/m-p/619622#M57886</guid>
      <dc:creator>OrenGal</dc:creator>
      <dc:date>2018-08-22T14:00:31Z</dc:date>
    </item>
    <item>
      <title>Re: Place 2D polygon labels inside polygon</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/place-2d-polygon-labels-inside-polygon/m-p/619623#M57887</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The MapImageLayer suggestion is a good one, Robert. That's got me thinking, and reviewing possible layer types, which is a good thing. Since I'm using AGOL hosting, I think that particular one is not an option, but some manner server-side rendering might be the best way to go.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Your proposed solution, Oren, has got my interest too. I'm a bit concerned about too many calls to that function, with too many vertices, with every scale and extent change ideally, but it may work just fine. I think I'll have to dig into it a bit more.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Alternative #3, I suppose I could create my own label point services. They wouldn't be dynamic, but at least they'd be predictable.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;One way or another, I think this is going to work. Thanks both for your input.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Aug 2018 16:18:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/place-2d-polygon-labels-inside-polygon/m-p/619623#M57887</guid>
      <dc:creator>DanFrey</dc:creator>
      <dc:date>2018-08-22T16:18:15Z</dc:date>
    </item>
    <item>
      <title>Re: Place 2D polygon labels inside polygon</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/place-2d-polygon-labels-inside-polygon/m-p/619624#M57888</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Dan,&lt;/P&gt;&lt;P&gt;Computers are fast, I would not worry about the recalculation... &lt;IMG src="https://community.esri.com/legacyfs/online/emoticons/happy.png" /&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Still, You can calc one time the x,y of label point and put it in the layer. Then you don't need to recalculate.&lt;/P&gt;&lt;P&gt;Another idea is to check if cetroid or center falls inside the polygon and only if not then calc label point.&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Aug 2018 04:17:01 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/place-2d-polygon-labels-inside-polygon/m-p/619624#M57888</guid>
      <dc:creator>OrenGal</dc:creator>
      <dc:date>2018-08-27T04:17:01Z</dc:date>
    </item>
    <item>
      <title>Re: Place 2D polygon labels inside polygon</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/place-2d-polygon-labels-inside-polygon/m-p/1075333#M73724</link>
      <description>&lt;P&gt;Are there any plans to improve the labeling of polygons?&amp;nbsp; This is not an issue at 3.x, the labels readjust as the extent changes.&amp;nbsp; I know the recommendation is to use map image layers, but thats not an acceptable answer when using ArcGIS Online layers.&amp;nbsp; I have looked clipping the features to the map extent and then labeling the centroid, but have run into some issues determining how to get the label expression to work.&lt;/P&gt;</description>
      <pubDate>Fri, 02 Jul 2021 19:57:05 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/place-2d-polygon-labels-inside-polygon/m-p/1075333#M73724</guid>
      <dc:creator>Justin_Greco</dc:creator>
      <dc:date>2021-07-02T19:57:05Z</dc:date>
    </item>
    <item>
      <title>Re: Place 2D polygon labels inside polygon</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/place-2d-polygon-labels-inside-polygon/m-p/1075436#M73727</link>
      <description>&lt;P&gt;Check out the labelPoints method:&lt;BR /&gt;&lt;A href="https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-geometryService.html#labelPoints" target="_blank"&gt;https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-geometryService.html#labelPoints&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 04 Jul 2021 00:25:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/place-2d-polygon-labels-inside-polygon/m-p/1075436#M73727</guid>
      <dc:creator>JohnGrayson</dc:creator>
      <dc:date>2021-07-04T00:25:21Z</dc:date>
    </item>
    <item>
      <title>Re: Place 2D polygon labels inside polygon</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/place-2d-polygon-labels-inside-polygon/m-p/1322389#M82073</link>
      <description>&lt;P&gt;There is a bug logged for this&lt;BR /&gt;&lt;A title="BUG-000145531" href="https://support.esri.com/en-us/bug/labels-fall-outside-the-polygons-when-the-polygons-cont-bug-000145531" target="_self"&gt;BUG-000145531&lt;/A&gt;&amp;nbsp;-&amp;nbsp;Labels fall outside the polygons when the polygons contain centroids outside the polygon boundary in ArcGIS Online Map Viewer.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;Bug ID Number BUG-000145531 &lt;TABLE width="100%" cellspacing="0" cellpadding="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Submitted&lt;/TD&gt;&lt;TD&gt;December 23, 2021&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Last Modified&lt;/TD&gt;&lt;TD&gt;July 17, 2023&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Applies to&lt;/TD&gt;&lt;TD&gt;ArcGIS Online&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Version found&lt;/TD&gt;&lt;TD&gt;9.3&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Operating System&lt;/TD&gt;&lt;TD&gt;N/A&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Operating System Version&lt;/TD&gt;&lt;TD&gt;N/A&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Status&lt;/TD&gt;&lt;TD&gt;Known Limit&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;H2&gt;Additional Information&lt;/H2&gt;This is a known limitation for the placement of the labels in ArcGIS API for JavaScript 4.x, where labels are placed at the shape centroid and not within the shape boundary. This is on the roadmap in the API to improve the label placement.&lt;BR /&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 25 Aug 2023 00:21:33 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/place-2d-polygon-labels-inside-polygon/m-p/1322389#M82073</guid>
      <dc:creator>DanMcCoy1</dc:creator>
      <dc:date>2023-08-25T00:21:33Z</dc:date>
    </item>
  </channel>
</rss>

