<?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: Label Both overlapping Points in the ArcGIS JavaScript API in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/label-both-overlapping-points-in-the-arcgis/m-p/375674#M34878</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;A href="https://community.esri.com/migrated-users/30589"&gt;Lucas Cotner&lt;/A&gt;‌ did you ever find a solution to this? Im looking to fix an overlapping issue on a custom WAB widget.&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 15 Apr 2019 05:23:17 GMT</pubDate>
    <dc:creator>LauraEmerson1</dc:creator>
    <dc:date>2019-04-15T05:23:17Z</dc:date>
    <item>
      <title>Label Both overlapping Points in the ArcGIS JavaScript API</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/label-both-overlapping-points-in-the-arcgis/m-p/375671#M34875</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In the ArcGIS JavaScript API (I'm currently using 3.10), there does not appear to be a way to label &lt;STRONG&gt;both&lt;/STRONG&gt; points that share the &lt;SPAN style="text-decoration: underline;"&gt;same location&lt;/SPAN&gt;. &lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In my application, each time an event fires, a Definition Query is applied to a FeatureLayer, and a LabelLayer is created off of that subset of points and added to the map. This all works great. The problem arises when two points share the same location: both points are still within the original FeatureLayer, and even though the LabelLayer CREATES both labels (they are both there in the LabelLayer's "_.preparedLabels" array), the first label of the two is &lt;EM&gt;Never added to the LabelLayer's 'graphics' array&lt;/EM&gt; and thus &lt;EM&gt;never added to the map. &lt;/EM&gt;&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It is also very hard to compare the graphics array to the preparedLabels array as they only appear to be populated while inside a LabelLayer Event function. This makes it tough to find elements missing from the former. &lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This seems like a basic requirement, but I have so far been unable to find any documentation on the issue or forum posts expressing a similar problem. Any suggestions or help would be much appreciated!&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;A snidbit of my code is below:&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;this.addressLayer.setDefinitionExpression("...");&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;var symbol = new TextSymbol();&lt;/P&gt;&lt;P&gt;var renderer = new SimpleRenderer(symbol);&lt;/P&gt;&lt;P&gt;var labelLayer = new LabelLayer();&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;labelLayer.addFeatureLayer(this.addressLayer, renderer, "{WalkOrder}");&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;this.map.addLayer(labelLayer);&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //labelLayer._preparedLabels.length --&amp;gt; 29&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //labelLayer.graphics.length --&amp;gt; 28 (missing our overlap!!)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Oct 2014 16:16:32 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/label-both-overlapping-points-in-the-arcgis/m-p/375671#M34875</guid>
      <dc:creator>LucasCotner</dc:creator>
      <dc:date>2014-10-10T16:16:32Z</dc:date>
    </item>
    <item>
      <title>Re: Label Both overlapping Points in the ArcGIS JavaScript API</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/label-both-overlapping-points-in-the-arcgis/m-p/375672#M34876</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Is there any resolution for this issue in newer versions of the API? I need both labels to appear for two overlapping polygons, otherwise there appears to be only 1. I'm on v3.14 but would happily upgrade to deal with this&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 Jan 2017 17:14:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/label-both-overlapping-points-in-the-arcgis/m-p/375672#M34876</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2017-01-13T17:14:15Z</dc:date>
    </item>
    <item>
      <title>Re: Label Both overlapping Points in the ArcGIS JavaScript API</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/label-both-overlapping-points-in-the-arcgis/m-p/375673#M34877</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Was there any solution for this? As need to enable overlapping labels on features on my GIS platform however I can't seem to find a way to do so.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 01 Dec 2017 07:12:39 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/label-both-overlapping-points-in-the-arcgis/m-p/375673#M34877</guid>
      <dc:creator>DylanBulteel</dc:creator>
      <dc:date>2017-12-01T07:12:39Z</dc:date>
    </item>
    <item>
      <title>Re: Label Both overlapping Points in the ArcGIS JavaScript API</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/label-both-overlapping-points-in-the-arcgis/m-p/375674#M34878</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;A href="https://community.esri.com/migrated-users/30589"&gt;Lucas Cotner&lt;/A&gt;‌ did you ever find a solution to this? Im looking to fix an overlapping issue on a custom WAB widget.&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 Apr 2019 05:23:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/label-both-overlapping-points-in-the-arcgis/m-p/375674#M34878</guid>
      <dc:creator>LauraEmerson1</dc:creator>
      <dc:date>2019-04-15T05:23:17Z</dc:date>
    </item>
    <item>
      <title>Re: Label Both overlapping Points in the ArcGIS JavaScript API</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/label-both-overlapping-points-in-the-arcgis/m-p/375675#M34879</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey Laura, unfortunately I never did! LabelLayer does not exist in the ESRI JS 4.x API, and so we don't use them anymore.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Apr 2019 13:13:41 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/label-both-overlapping-points-in-the-arcgis/m-p/375675#M34879</guid>
      <dc:creator>LucasCotner</dc:creator>
      <dc:date>2019-04-16T13:13:41Z</dc:date>
    </item>
  </channel>
</rss>

