<?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: Sublayers not showing when more than one layer have visible value as true in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/sublayers-not-showing-when-more-than-one-layer/m-p/380120#M35302</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Before I mark as answered, something strange is still happening.&amp;nbsp;&lt;/P&gt;&lt;P&gt;this works perfectly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;{id: 16,&lt;BR /&gt; visible: true,&lt;BR /&gt; title: "Highway"},&lt;BR /&gt; {id: 10,&lt;BR /&gt; visible: true,&lt;BR /&gt; title: "Sand Dune"},&lt;BR /&gt; {id: 8,&lt;BR /&gt; visible: true,&lt;BR /&gt; title: "Dams"},&lt;BR /&gt; {id: 7,&lt;BR /&gt; visible: true,&lt;BR /&gt; title: "Rivers"},&lt;BR /&gt; {id: 5,&lt;BR /&gt; visible: true,&lt;BR /&gt; title: "DWAF Water Scheme"},&lt;BR /&gt; {id: 4,&lt;BR /&gt; visible: true,&lt;BR /&gt; title: "Prison"},&lt;BR /&gt; {id: 3,&lt;BR /&gt; visible: true,&lt;BR /&gt; title: "School"},&lt;BR /&gt; {id: 2,&lt;BR /&gt; visible: true,&lt;BR /&gt; title: "Police Station"},&lt;BR /&gt; {id: 1,&lt;BR /&gt; visible: true,&lt;BR /&gt; title: "Health Facility"}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But when my code is like this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;{id: 11,&lt;BR /&gt; visible: true,&lt;BR /&gt; title: "Vegetation"},&lt;BR /&gt; {id: 10,&lt;BR /&gt; visible: true,&lt;BR /&gt; title: "Sand Dune"},&lt;BR /&gt; {id: 8,&lt;BR /&gt; visible: true,&lt;BR /&gt; title: "Dams"},&lt;BR /&gt; {id: 7,&lt;BR /&gt; visible: true,&lt;BR /&gt; title: "Rivers"},&lt;BR /&gt; {id: 5,&lt;BR /&gt; visible: true,&lt;BR /&gt; title: "DWAF Water Scheme"},&lt;BR /&gt; {id: 4,&lt;BR /&gt; visible: true,&lt;BR /&gt; title: "Prison"},&lt;BR /&gt; {id: 3,&lt;BR /&gt; visible: true,&lt;BR /&gt; title: "School"},&lt;BR /&gt; {id: 2,&lt;BR /&gt; visible: true,&lt;BR /&gt; title: "Police Station"},&lt;BR /&gt; {id: 1,&lt;BR /&gt; visible: true,&lt;BR /&gt; title: "Health Facility"}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The same error i received as last time still occurs. Its kind of selective even if it is in descending order.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 12 Jul 2019 12:37:10 GMT</pubDate>
    <dc:creator>bobongubza</dc:creator>
    <dc:date>2019-07-12T12:37:10Z</dc:date>
    <item>
      <title>Sublayers not showing when more than one layer have visible value as true</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/sublayers-not-showing-when-more-than-one-layer/m-p/380116#M35298</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Something really strange is happening and I do not know why.&amp;nbsp;When I create a new MapImageLayer and call for two sublayers whereas the visible value for both sublayers is 'true' I get an error.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;RAILLAYER = new MapImageLayer({&lt;BR /&gt; url: "https://rave1:6443/arcgis/rest/services/RAIL/MapServer", sublayers: [&lt;/P&gt;&lt;P&gt;{id: 0,&lt;BR /&gt; visible: true,&lt;BR /&gt; title: "Railway Station"},&lt;/P&gt;&lt;P&gt;{id: 20,&lt;BR /&gt; visible: true,&lt;BR /&gt; title: "Railway"}&lt;/P&gt;&lt;P&gt;]&lt;BR /&gt; });&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When there is one visible value as true (the other false), the sublayer displays.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;RAILLAYER = new MapImageLayer({&lt;BR /&gt; url: "https://rave1:6443/arcgis/rest/services/RAIL/MapServer", sublayers: [{id: 0,&lt;BR /&gt; visible: true,&lt;BR /&gt; title: "Railway Station"},&lt;/P&gt;&lt;P&gt;{id: 20,&lt;BR /&gt; visible: false,&lt;BR /&gt; title: "Railway"}&lt;/P&gt;&lt;P&gt;]&lt;BR /&gt; });&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The weird thing is that I tried using the sample layer from esri&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="http://sampleserver6.arcgisonline.com/arcgis/rest/services/911CallsHotspot/MapServer"&gt;http://sampleserver6.arcgisonline.com/arcgis/rest/services/911CallsHotspot/MapServer&lt;/A&gt;&lt;/P&gt;&lt;P&gt;and it works perfectly when both sublayers visible value are defined as true.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So I just want to figure out what could be the cause of this issue. By the way I am using arcgis javascript 4.10&lt;IMG alt="" class="image-1 jive-image j-img-original" src="/legacyfs/online/452859_sublayer error.PNG" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Jul 2019 12:14:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/sublayers-not-showing-when-more-than-one-layer/m-p/380116#M35298</guid>
      <dc:creator>bobongubza</dc:creator>
      <dc:date>2019-07-11T12:14:03Z</dc:date>
    </item>
    <item>
      <title>Re: Sublayers not showing when more than one layer have visible value as true</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/sublayers-not-showing-when-more-than-one-layer/m-p/380117#M35299</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Bobo,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; Try adding the sublayers in descending order:&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;RAILLAYER &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;new&lt;/SPAN&gt; &lt;SPAN class="token class-name"&gt;MapImageLayer&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
  url&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"https://rave1:6443/arcgis/rest/services/RAIL/MapServer"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
  sublayers&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
    id&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;20&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
    visible&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;true&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
    title&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"Railway"&lt;/SPAN&gt;
  &lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
    id&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;0&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
    visible&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;true&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
    title&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"Railway  Station"&lt;/SPAN&gt;
  &lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;
&lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;‍‍‍‍‍‍‍‍‍‍‍‍&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;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&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;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 17:32:27 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/sublayers-not-showing-when-more-than-one-layer/m-p/380117#M35299</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2021-12-11T17:32:27Z</dc:date>
    </item>
    <item>
      <title>Re: Sublayers not showing when more than one layer have visible value as true</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/sublayers-not-showing-when-more-than-one-layer/m-p/380118#M35300</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Robert, you are an arcgis wiz. Thank you, it worked.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could you explain to me why it works in descending order but not in ascending order.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 Jul 2019 07:07:36 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/sublayers-not-showing-when-more-than-one-layer/m-p/380118#M35300</guid>
      <dc:creator>bobongubza</dc:creator>
      <dc:date>2019-07-12T07:07:36Z</dc:date>
    </item>
    <item>
      <title>Re: Sublayers not showing when more than one layer have visible value as true</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/sublayers-not-showing-when-more-than-one-layer/m-p/380119#M35301</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Bobo,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; This is just a known feature with sublayers that is not documented. Don't forget to mark the question as answered.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 Jul 2019 12:26:05 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/sublayers-not-showing-when-more-than-one-layer/m-p/380119#M35301</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2019-07-12T12:26:05Z</dc:date>
    </item>
    <item>
      <title>Re: Sublayers not showing when more than one layer have visible value as true</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/sublayers-not-showing-when-more-than-one-layer/m-p/380120#M35302</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Before I mark as answered, something strange is still happening.&amp;nbsp;&lt;/P&gt;&lt;P&gt;this works perfectly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;{id: 16,&lt;BR /&gt; visible: true,&lt;BR /&gt; title: "Highway"},&lt;BR /&gt; {id: 10,&lt;BR /&gt; visible: true,&lt;BR /&gt; title: "Sand Dune"},&lt;BR /&gt; {id: 8,&lt;BR /&gt; visible: true,&lt;BR /&gt; title: "Dams"},&lt;BR /&gt; {id: 7,&lt;BR /&gt; visible: true,&lt;BR /&gt; title: "Rivers"},&lt;BR /&gt; {id: 5,&lt;BR /&gt; visible: true,&lt;BR /&gt; title: "DWAF Water Scheme"},&lt;BR /&gt; {id: 4,&lt;BR /&gt; visible: true,&lt;BR /&gt; title: "Prison"},&lt;BR /&gt; {id: 3,&lt;BR /&gt; visible: true,&lt;BR /&gt; title: "School"},&lt;BR /&gt; {id: 2,&lt;BR /&gt; visible: true,&lt;BR /&gt; title: "Police Station"},&lt;BR /&gt; {id: 1,&lt;BR /&gt; visible: true,&lt;BR /&gt; title: "Health Facility"}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But when my code is like this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;{id: 11,&lt;BR /&gt; visible: true,&lt;BR /&gt; title: "Vegetation"},&lt;BR /&gt; {id: 10,&lt;BR /&gt; visible: true,&lt;BR /&gt; title: "Sand Dune"},&lt;BR /&gt; {id: 8,&lt;BR /&gt; visible: true,&lt;BR /&gt; title: "Dams"},&lt;BR /&gt; {id: 7,&lt;BR /&gt; visible: true,&lt;BR /&gt; title: "Rivers"},&lt;BR /&gt; {id: 5,&lt;BR /&gt; visible: true,&lt;BR /&gt; title: "DWAF Water Scheme"},&lt;BR /&gt; {id: 4,&lt;BR /&gt; visible: true,&lt;BR /&gt; title: "Prison"},&lt;BR /&gt; {id: 3,&lt;BR /&gt; visible: true,&lt;BR /&gt; title: "School"},&lt;BR /&gt; {id: 2,&lt;BR /&gt; visible: true,&lt;BR /&gt; title: "Police Station"},&lt;BR /&gt; {id: 1,&lt;BR /&gt; visible: true,&lt;BR /&gt; title: "Health Facility"}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The same error i received as last time still occurs. Its kind of selective even if it is in descending order.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 Jul 2019 12:37:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/sublayers-not-showing-when-more-than-one-layer/m-p/380120#M35302</guid>
      <dc:creator>bobongubza</dc:creator>
      <dc:date>2019-07-12T12:37:10Z</dc:date>
    </item>
    <item>
      <title>Re: Sublayers not showing when more than one layer have visible value as true</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/sublayers-not-showing-when-more-than-one-layer/m-p/380121#M35303</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Bobo,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;What is layer 11? is it an actual layer or a group layer? Are you sure the id 11 is your Vegetation layer?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 Jul 2019 12:51:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/sublayers-not-showing-when-more-than-one-layer/m-p/380121#M35303</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2019-07-12T12:51:16Z</dc:date>
    </item>
    <item>
      <title>Re: Sublayers not showing when more than one layer have visible value as true</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/sublayers-not-showing-when-more-than-one-layer/m-p/380122#M35304</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It is the actual layer.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 Jul 2019 15:13:59 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/sublayers-not-showing-when-more-than-one-layer/m-p/380122#M35304</guid>
      <dc:creator>bobongubza</dc:creator>
      <dc:date>2019-07-12T15:13:59Z</dc:date>
    </item>
    <item>
      <title>Re: Sublayers not showing when more than one layer have visible value as true</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/sublayers-not-showing-when-more-than-one-layer/m-p/380123#M35305</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sorry to say this might be a bug then.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 Jul 2019 15:45:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/sublayers-not-showing-when-more-than-one-layer/m-p/380123#M35305</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2019-07-12T15:45:17Z</dc:date>
    </item>
  </channel>
</rss>

