<?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: Display labels/text symbols without overlap in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/display-labels-text-symbols-without-overlap/m-p/1021905#M71560</link>
    <description>&lt;P&gt;Thank you &lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/169842"&gt;@Noah-Sager&lt;/a&gt;&amp;nbsp; and&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/1104"&gt;@RobertScheitlin__GISP&lt;/a&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sun, 31 Jan 2021 09:26:49 GMT</pubDate>
    <dc:creator>VenkataSrikanthDasari</dc:creator>
    <dc:date>2021-01-31T09:26:49Z</dc:date>
    <item>
      <title>Display labels/text symbols without overlap</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/display-labels-text-symbols-without-overlap/m-p/1018514#M71449</link>
      <description>&lt;DIV class="lia-quilt-row lia-quilt-row-message-subject"&gt;&lt;SPAN&gt;Hi&amp;nbsp;&lt;SPAN class=""&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/1104"&gt;@RobertScheitlin__GISP&lt;/a&gt;,&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV class="lia-quilt-row lia-quilt-row-message-subject"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="lia-quilt-row lia-quilt-row-message-subject"&gt;&lt;SPAN&gt;&lt;SPAN class=""&gt;Hope you are doing great and pinging you for one more issue.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV class="lia-quilt-row lia-quilt-row-message-subject"&gt;&lt;SPAN&gt;&lt;SPAN class=""&gt;I feel this is a bug .. please have a look and confirm.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV class="lia-quilt-row lia-quilt-row-message-subject"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="lia-quilt-row lia-quilt-row-message-subject"&gt;&lt;SPAN&gt;I am trying to label graphics on my map and am having trouble getting exactly the display that I want.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV class="lia-quilt-row lia-quilt-row-message-body"&gt;&lt;DIV class="lia-quilt-column lia-quilt-column-24 lia-quilt-column-single lia-quilt-column-message-body-content"&gt;&lt;DIV class="lia-quilt-column-alley lia-quilt-column-alley-single"&gt;&lt;DIV class="lia-message-body lia-component-message-view-widget-body lia-component-body-signature-highlight-escalation lia-component-message-view-widget-body-signature-highlight-escalation"&gt;&lt;DIV class="lia-message-body-content"&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Using a TextSymbol doesn't work because then they all stack on top of each other making it impossible to see which features are actually at the location.&amp;nbsp;&lt;/P&gt;&lt;P&gt;The tutorial from four years ago about how to cluster the graphics is OK, but I would rather not cluster them. I would prefer that the labels/text symbols move slightly in order to accommodate the other labels around them.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried using &lt;SPAN&gt;deconflictionStrategy: static and none and the output is same for both properties which is stacked on top of each other.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;P.S: I am not using Portal and using only ArcGIS Server manager Feature Layer URL only and here is the code&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;!DOCTYPE html&amp;gt;
&amp;lt;html&amp;gt;
  &amp;lt;head&amp;gt;
    &amp;lt;meta charset="utf-8" /&amp;gt;
    &amp;lt;meta
      name="viewport"
      content="initial-scale=1,maximum-scale=1,user-scalable=no"
    /&amp;gt;
    &amp;lt;title&amp;gt;
      Add labels to a FeatureLayer | Sample | ArcGIS API for JavaScript 4.18
    &amp;lt;/title&amp;gt;

    &amp;lt;link
      rel="stylesheet"
      href="https://js.arcgis.com/4.18/esri/themes/light-green/main.css"
    /&amp;gt;

    &amp;lt;style&amp;gt;
      html,
      body,
      #viewDiv {
        padding: 0;
        margin: 0;
        height: 100%;
        width: 100%;
        background-color: black;
      }
    &amp;lt;/style&amp;gt;

    &amp;lt;script src="https://js.arcgis.com/4.18/"&amp;gt;&amp;lt;/script&amp;gt;

    &amp;lt;script&amp;gt;
      require([
        "esri/WebMap",
        "esri/views/MapView",
        "esri/layers/FeatureLayer",
        "esri/widgets/Search",
        "esri/widgets/ScaleBar",
        "esri/Map"
      ], function (WebMap, MapView, FeatureLayer, Search, ScaleBar, Map) {
        const labelClass = {
          // autocasts as new LabelClass()
          symbol: {
            type: "text", // autocasts as new TextSymbol()
            color: "black",
            //haloColor: "blue",
            haloSize: 1,
            font: {
              // autocast as new Font()
              family: "Arial Unicode MS, Arial",
              size: 15,
              weight: "bold"
            }
          },
          labelPlacement: "above-right",
          labelExpressionInfo: {
            expression:
              "$feature.SAPEQUIPID + ' '+ $feature.JPNUMBER + ' ' +$feature.JPSEQUENCE"
          },
          maxScale: 0,
          minScale: 4514,
          deconflictionStrategy: "none"
          //where: "Conference = 'AFC'"
        };

        let featurelayer = new FeatureLayer({
          url:
            "xxxxxx/MapServer/1",
          title: "Support Structure"
        });
        featurelayer.labelingInfo = [labelClass];

        let map = new Map({
          basemap: "streets"
        });
        let view = new MapView({
          map: map,
          container: "viewDiv",
          center: [-122.379403, 37.793683], // Sets the center point of the view at a specified lon/lat
          zoom: 13 // Sets the zoom LOD to 13

          // center: [-122.4226616669898,37.750262026866835],  // Sets the center point of the view at a specified lon/lat
          // zoom: 20 // Sets the zoom LOD to 13
        });
        map.add(featurelayer);

        // Adds the search widget to the top right corner of the view
        view.ui.add(
          new Search({
            view: view
          }),
          "top-right"
        );
        var scaleBar = new ScaleBar({
          view: view,
          unit: "dual"
        });
        view.ui.add(scaleBar, "bottom-left");
      });
    &amp;lt;/script&amp;gt;
  &amp;lt;/head&amp;gt;

  &amp;lt;body&amp;gt;
    &amp;lt;div id="viewDiv"&amp;gt;&amp;lt;/div&amp;gt;
  &amp;lt;/body&amp;gt;
&amp;lt;/html&amp;gt;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 21 Jan 2021 12:18:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/display-labels-text-symbols-without-overlap/m-p/1018514#M71449</guid>
      <dc:creator>VenkataSrikanthDasari</dc:creator>
      <dc:date>2021-01-21T12:18:15Z</dc:date>
    </item>
    <item>
      <title>Re: Display labels/text symbols without overlap</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/display-labels-text-symbols-without-overlap/m-p/1018655#M71452</link>
      <description>&lt;P&gt;This is not a bug just a limitation. JS API is not designed to do labeling with complex label conflict detection like ArcGIS Desktop is. If you need better conflict avoidance then you need to do the labeling in the map service in Desktop and consume that labeled map service in your JS API app.&lt;/P&gt;</description>
      <pubDate>Thu, 21 Jan 2021 13:30:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/display-labels-text-symbols-without-overlap/m-p/1018655#M71452</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2021-01-21T13:30:00Z</dc:date>
    </item>
    <item>
      <title>Re: Display labels/text symbols without overlap</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/display-labels-text-symbols-without-overlap/m-p/1018807#M71460</link>
      <description>&lt;P&gt;Robert is correct. The API is limited by the web resources. For better labeling performance and visualization, you can try playing around with minScale and maxScale values so that only specific labels appear at specific scale ranges.&lt;/P&gt;&lt;P&gt;&lt;A href="https://developers.arcgis.com/javascript/latest/sample-code/sandbox/index.html?sample=labels-multiple-classes" target="_blank"&gt;https://developers.arcgis.com/javascript/latest/sample-code/sandbox/index.html?sample=labels-multiple-classes&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 21 Jan 2021 20:07:01 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/display-labels-text-symbols-without-overlap/m-p/1018807#M71460</guid>
      <dc:creator>Noah-Sager</dc:creator>
      <dc:date>2021-01-21T20:07:01Z</dc:date>
    </item>
    <item>
      <title>Re: Display labels/text symbols without overlap</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/display-labels-text-symbols-without-overlap/m-p/1021905#M71560</link>
      <description>&lt;P&gt;Thank you &lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/169842"&gt;@Noah-Sager&lt;/a&gt;&amp;nbsp; and&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/1104"&gt;@RobertScheitlin__GISP&lt;/a&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 31 Jan 2021 09:26:49 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/display-labels-text-symbols-without-overlap/m-p/1021905#M71560</guid>
      <dc:creator>VenkataSrikanthDasari</dc:creator>
      <dc:date>2021-01-31T09:26:49Z</dc:date>
    </item>
    <item>
      <title>Re: Display labels/text symbols without overlap</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/display-labels-text-symbols-without-overlap/m-p/1303451#M81544</link>
      <description>&lt;P&gt;Is there a way to do a carriage return using this method?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 27 Jun 2023 16:32:32 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/display-labels-text-symbols-without-overlap/m-p/1303451#M81544</guid>
      <dc:creator>RobertKirkwood</dc:creator>
      <dc:date>2023-06-27T16:32:32Z</dc:date>
    </item>
  </channel>
</rss>

