<?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: LabelClass minScale and maxScale issue in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/labelclass-minscale-and-maxscale-issue/m-p/1258812#M80282</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/169842"&gt;@Noah-Sager&lt;/a&gt;,&lt;BR /&gt;&lt;BR /&gt;thank you for your input! At first it did look like the problem might be solved, but unfortunately it's just because the basemap forces certain zoom levels. If I remove the basemap, the problem remains.&lt;BR /&gt;&lt;BR /&gt;Our application unfortunately needs custom zoom levels, and at 1:11000 or 1:12000, there are no labels, even though they should be there according to the LabelClasses&lt;/P&gt;</description>
    <pubDate>Thu, 16 Feb 2023 08:53:55 GMT</pubDate>
    <dc:creator>KonstantinArbogastEBP</dc:creator>
    <dc:date>2023-02-16T08:53:55Z</dc:date>
    <item>
      <title>LabelClass minScale and maxScale issue</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/labelclass-minscale-and-maxscale-issue/m-p/1258465#M80265</link>
      <description>&lt;P&gt;Dear community,&lt;/P&gt;&lt;P&gt;I have a Feature Layer with two separate label classes. One that should be visible up to a scale of 1:10000, and the other one from that scale. So for one label class, I have added 10000 as maxScale and for the other as minScale.&lt;/P&gt;&lt;P&gt;I now expect to see Label Class 1 at 1:9999 and Label Class 2 at 1:10001. However, reality shows Label Class 1 from 1:10500 and Label Class 2 up to 1:13500. At around 1:11000, there are no labels at all. Below you can find a code example with a default scale of 1:11000 showing no labels at all. Zooming in will show "Class 1", zooming out will show "Class 2".&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&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;ArcGIS Maps SDK for JavaScript Tutorials: Add a feature layer&amp;lt;/title&amp;gt;
  &amp;lt;style&amp;gt;
    html, body, #viewDiv {
      padding: 0;
      margin: 0;
      height: 100%;
      width: 100%;
    }
  &amp;lt;/style&amp;gt;
  &amp;lt;link rel="stylesheet" href="https://js.arcgis.com/4.25/esri/themes/light/main.css"&amp;gt;
  &amp;lt;script src="https://js.arcgis.com/4.25/"&amp;gt;&amp;lt;/script&amp;gt;

  &amp;lt;script&amp;gt;
  require([
    "esri/config",
    "esri/Map",
    "esri/views/MapView",

    "esri/layers/FeatureLayer"

  ], function(esriConfig,Map, MapView, FeatureLayer) {

  esriConfig.apiKey = "&amp;lt;YOUR API KEY&amp;gt;";

  const map = new Map({
    basemap: ""
  });

  const view = new MapView({
    container: "viewDiv",
    map: map,
    center: [-118.80543,34.04000],
    scale: 11000
  });
    
    const labelClass1 = {  // autocasts as new LabelClass()
      symbol: {
        type: "text",  // autocasts as new TextSymbol()
        color: "white",
        haloColor: "blue",
        haloSize: 1,
        font: {  // autocast as new Font()
           family: "Ubuntu Mono",
           size: 14,
           weight: "bold"
         }
      },
      labelPlacement: "above-right",
      labelExpressionInfo: {
        expression: "'Class 1'"
      },
      maxScale: 0,
      minScale: 10000
    };
    const labelClass2 = {  // autocasts as new LabelClass()
      symbol: {
        type: "text",  // autocasts as new TextSymbol()
        color: "white",
        haloColor: "blue",
        haloSize: 1,
        font: {  // autocast as new Font()
           family: "Ubuntu Mono",
           size: 14,
           weight: "bold"
         }
      },
      labelPlacement: "above-right",
      labelExpressionInfo: {
        expression: "'Class 2'"
      },
      maxScale: 10000,
      minScale: 0
    };

  //Trails feature layer (lines)
  const trailheadsLayer = new FeatureLayer({
    url: "https://services3.arcgis.com/GVgbJbqm8hXASVYi/arcgis/rest/services/Trails/FeatureServer/0",
    labelingInfo: [labelClass1, labelClass2]
  });

  map.add(trailheadsLayer);

  });
&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;Am I missing something? Or is this a bug?&lt;/P&gt;</description>
      <pubDate>Wed, 15 Feb 2023 14:12:38 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/labelclass-minscale-and-maxscale-issue/m-p/1258465#M80265</guid>
      <dc:creator>KonstantinArbogastEBP</dc:creator>
      <dc:date>2023-02-15T14:12:38Z</dc:date>
    </item>
    <item>
      <title>Re: LabelClass minScale and maxScale issue</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/labelclass-minscale-and-maxscale-issue/m-p/1258531#M80272</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/551413"&gt;@KonstantinArbogastEBP&lt;/a&gt;,&amp;nbsp;thanks for posting your question here. I looked at your sample code, and I think there's an issue with the min/max scales. For example, for label class 2, the minscale is smaller than the maxscale. However, I'm not 100% sure if setting the scale to zero should be a factor or not.&lt;/P&gt;&lt;P&gt;&lt;A href="https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-LabelClass.html#minScale" target="_blank"&gt;https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-LabelClass.html#minScale&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Here is an updated test-app, that appears to handle better in my testing.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;updated test-app&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://codepen.io/noash/pen/JjaoKGY?editors=1000" target="_blank"&gt;https://codepen.io/noash/pen/JjaoKGY?editors=1000&lt;/A&gt;&lt;/P&gt;&lt;P&gt;See if this helps, otherwise, can you share an app that more clearly demonstrates the issue with min/max label scaling?&lt;/P&gt;</description>
      <pubDate>Wed, 15 Feb 2023 16:15:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/labelclass-minscale-and-maxscale-issue/m-p/1258531#M80272</guid>
      <dc:creator>Noah-Sager</dc:creator>
      <dc:date>2023-02-15T16:15:11Z</dc:date>
    </item>
    <item>
      <title>Re: LabelClass minScale and maxScale issue</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/labelclass-minscale-and-maxscale-issue/m-p/1258812#M80282</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/169842"&gt;@Noah-Sager&lt;/a&gt;,&lt;BR /&gt;&lt;BR /&gt;thank you for your input! At first it did look like the problem might be solved, but unfortunately it's just because the basemap forces certain zoom levels. If I remove the basemap, the problem remains.&lt;BR /&gt;&lt;BR /&gt;Our application unfortunately needs custom zoom levels, and at 1:11000 or 1:12000, there are no labels, even though they should be there according to the LabelClasses&lt;/P&gt;</description>
      <pubDate>Thu, 16 Feb 2023 08:53:55 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/labelclass-minscale-and-maxscale-issue/m-p/1258812#M80282</guid>
      <dc:creator>KonstantinArbogastEBP</dc:creator>
      <dc:date>2023-02-16T08:53:55Z</dc:date>
    </item>
    <item>
      <title>Re: LabelClass minScale and maxScale issue</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/labelclass-minscale-and-maxscale-issue/m-p/1258880#M80288</link>
      <description>&lt;P&gt;Hmm, in my test app, I see labels at both&amp;nbsp;&lt;SPAN&gt;1:11000 and 1:12000.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 16 Feb 2023 14:38:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/labelclass-minscale-and-maxscale-issue/m-p/1258880#M80288</guid>
      <dc:creator>Noah-Sager</dc:creator>
      <dc:date>2023-02-16T14:38:21Z</dc:date>
    </item>
    <item>
      <title>Re: LabelClass minScale and maxScale issue</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/labelclass-minscale-and-maxscale-issue/m-p/1258887#M80290</link>
      <description>&lt;P&gt;While the basemap is active, you won't actually be at the scales 1:11000 and 1:12000, those are rounded to the next defined zoom level which is at around 1:18000. There it works.&lt;/P&gt;&lt;P&gt;Have you tried disabling the basemap and trying again with these scales?&lt;/P&gt;</description>
      <pubDate>Thu, 16 Feb 2023 14:54:49 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/labelclass-minscale-and-maxscale-issue/m-p/1258887#M80290</guid>
      <dc:creator>KonstantinArbogastEBP</dc:creator>
      <dc:date>2023-02-16T14:54:49Z</dc:date>
    </item>
  </channel>
</rss>

