<?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 sublayers minScale and maxScale Issue in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/sublayers-minscale-and-maxscale-issue/m-p/519919#M48436</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I wish to have certain sublayers of a dynamic layer render at scales different from those in the layer properties. I can get the minScale and maxScale to work with one layer, but (for some reason), not another. The one on which it isn't working has cached tiles and I speculate that is the issue, but I honestly have no idea.&lt;/P&gt;&lt;P&gt;Here's the example that works:&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;var cities = new MapImageLayer({&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; url: "https://sampleserver6.arcgisonline.com/arcgis/rest/services/USA/MapServer",&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; sublayers: [&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; id: 0,&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; minScale: 5000000,&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; maxScale: 24000&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; ]&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;});&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;Here's the one that isn't working (truncated for ease). The minscale is set at a ridiculous number at the moment because I was trying to get it to render no matter how far zoomed out:&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;var transportation = new MapImageLayer({&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; url: "https://tigerweb.geo.census.gov/arcgis/rest/services/TIGERweb/Transportation/MapServer",&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; sublayers: [{&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; id: 8,&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; minScale: 10000000,&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; maxScale:&amp;nbsp; 1001&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; },{&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; id: 9,&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; minScale: 10000000,&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; maxScale:&amp;nbsp; 1001&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; }]&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; &lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;});&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;Any insight would be greatly appreciated. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 18 Jun 2019 02:48:56 GMT</pubDate>
    <dc:creator>ToddFagin</dc:creator>
    <dc:date>2019-06-18T02:48:56Z</dc:date>
    <item>
      <title>sublayers minScale and maxScale Issue</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/sublayers-minscale-and-maxscale-issue/m-p/519919#M48436</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I wish to have certain sublayers of a dynamic layer render at scales different from those in the layer properties. I can get the minScale and maxScale to work with one layer, but (for some reason), not another. The one on which it isn't working has cached tiles and I speculate that is the issue, but I honestly have no idea.&lt;/P&gt;&lt;P&gt;Here's the example that works:&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;var cities = new MapImageLayer({&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; url: "https://sampleserver6.arcgisonline.com/arcgis/rest/services/USA/MapServer",&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; sublayers: [&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; id: 0,&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; minScale: 5000000,&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; maxScale: 24000&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; ]&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;});&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;Here's the one that isn't working (truncated for ease). The minscale is set at a ridiculous number at the moment because I was trying to get it to render no matter how far zoomed out:&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;var transportation = new MapImageLayer({&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; url: "https://tigerweb.geo.census.gov/arcgis/rest/services/TIGERweb/Transportation/MapServer",&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; sublayers: [{&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; id: 8,&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; minScale: 10000000,&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; maxScale:&amp;nbsp; 1001&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; },{&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; id: 9,&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; minScale: 10000000,&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; maxScale:&amp;nbsp; 1001&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; }]&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; &lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;});&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;Any insight would be greatly appreciated. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Jun 2019 02:48:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/sublayers-minscale-and-maxscale-issue/m-p/519919#M48436</guid>
      <dc:creator>ToddFagin</dc:creator>
      <dc:date>2019-06-18T02:48:56Z</dc:date>
    </item>
    <item>
      <title>Re: sublayers minScale and maxScale Issue</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/sublayers-minscale-and-maxscale-issue/m-p/519920#M48437</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi &lt;A href="https://community.esri.com/migrated-users/5307" target="_blank"&gt;Todd Fagin&lt;/A&gt;,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The explanation is quite straightforward, I think.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Your &lt;SPAN style="font-family: courier new, courier, monospace;"&gt;cities&lt;/SPAN&gt; layer (i.e. the example that works) comes from this sample server &lt;A class="link-titled" href="https://sampleserver6.arcgisonline.com/arcgis/rest/services/USA/MapServer" title="https://sampleserver6.arcgisonline.com/arcgis/rest/services/USA/MapServer" rel="nofollow noopener noreferrer" target="_blank"&gt;USA (MapServer)&lt;/A&gt; and has no visibility range set. Both Min Scale and Max Scale are set to 0 (&lt;SPAN style="font-family: courier new, courier, monospace;"&gt;"minScale": 0, "maxScale": 0&lt;/SPAN&gt;), thus allowing you to set these values in your JavaScript application.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The TIGERweb/Transportation data comes from this server &lt;A class="link-titled" href="https://tigerweb.geo.census.gov/arcgis/rest/services/TIGERweb/Transportation/MapServer" title="https://tigerweb.geo.census.gov/arcgis/rest/services/TIGERweb/Transportation/MapServer" rel="nofollow noopener noreferrer" target="_blank"&gt;TIGERweb/Transportation (MapServer)&lt;/A&gt; and as you can see each and every layer has it's own visibility range set. The different road types (Primary, Secondary and Local Roads) are even offered multiple times, for different visibility ranges. And in this case your options to manipulate (or set) the visibility are much more limited. (Of course you can limit the visibility within it's visibility range, but you cannot extend it outside this range.) So, even though your JavaScript code says the layer should be visible, the TIGERweb server will not return anything to show...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would suggest to add the TIGERweb/Transportation data as a&amp;nbsp;&lt;A class="link-titled" href="https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-TileLayer.html" title="https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-TileLayer.html" rel="nofollow noopener noreferrer" target="_blank"&gt;TileLayer&lt;/A&gt; instead, like this:&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;var transportation = new TileLayer({
  url: "https://tigerweb.geo.census.gov/arcgis/rest/services/TIGERweb/Transportation/MapServer"
});
&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;IMG class="image-1 j-img-floatend jive-image" src="https://community.esri.com/legacyfs/online/450622_pastedImage_9.png" style="float: right;" /&gt;&lt;/P&gt;&lt;P&gt;In this way all layers will be added to the map and and automatically adhere to the visibility range settings on the server.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps to solve your issue.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Egge-Jan&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 22:40:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/sublayers-minscale-and-maxscale-issue/m-p/519920#M48437</guid>
      <dc:creator>Egge-Jan_Pollé</dc:creator>
      <dc:date>2021-12-11T22:40:29Z</dc:date>
    </item>
    <item>
      <title>Re: sublayers minScale and maxScale Issue</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/sublayers-minscale-and-maxscale-issue/m-p/519921#M48438</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That makes sense. I was under the (false) impression that I would be able to completely override the min and max scales.&lt;BR /&gt;&lt;BR /&gt;For my purposes, though, the tile layers won't work. I need the local roads to turn on sooner than they currently do. This means I am either going to have to try to find another source or create my own service (which I was absolutely trying to avoid).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your reply.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Jun 2019 12:26:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/sublayers-minscale-and-maxscale-issue/m-p/519921#M48438</guid>
      <dc:creator>ToddFagin</dc:creator>
      <dc:date>2019-06-18T12:26:10Z</dc:date>
    </item>
    <item>
      <title>Re: sublayers minScale and maxScale Issue</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/sublayers-minscale-and-maxscale-issue/m-p/519922#M48439</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi &lt;A href="https://community.esri.com/migrated-users/5307"&gt;Todd Fagin&lt;/A&gt;,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You might have a look in the &lt;A class="link-titled" href="https://livingatlas.arcgis.com/en/" title="https://livingatlas.arcgis.com/en/"&gt;Living Atlas of the World&lt;/A&gt;. There is a dataset (in the Exclusive content for subscribers) called &lt;STRONG&gt;USA Roads&lt;/STRONG&gt;. This Map Image Layer by Esri displays roads from 2014 U.S. Census TIGER dataset. Maybe this will suit your needs?&lt;/P&gt;&lt;P&gt;BTW - If you think your original question has been answered, you might mark it as such. In this way we help the Esri Community to find correct answers.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Egge-Jan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Jun 2019 13:03:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/sublayers-minscale-and-maxscale-issue/m-p/519922#M48439</guid>
      <dc:creator>Egge-Jan_Pollé</dc:creator>
      <dc:date>2019-06-18T13:03:19Z</dc:date>
    </item>
    <item>
      <title>Re: sublayers minScale and maxScale Issue</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/sublayers-minscale-and-maxscale-issue/m-p/519923#M48440</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Done. And I will look into the Living Atlas of the World.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Jun 2019 14:10:13 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/sublayers-minscale-and-maxscale-issue/m-p/519923#M48440</guid>
      <dc:creator>ToddFagin</dc:creator>
      <dc:date>2019-06-18T14:10:13Z</dc:date>
    </item>
  </channel>
</rss>

