<?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: WMSLayer sublayers how determine dynamically, for example, by choosing from list of all possible values ​​that I know. in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/wmslayer-sublayers-how-determine-dynamically-for/m-p/1211506#M78670</link>
    <description>&lt;P&gt;&lt;SPAN&gt;Thank you very much for your attention and your response. This is a very good idea! But...&amp;nbsp; &amp;nbsp;In code to make just visible true to Sublayer, every time you need to run through the cycle of all layers and look for it by name.&amp;nbsp;&amp;nbsp;Which is very very slow, long and inefficient. Really much easier just to change&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;sublayers for&amp;nbsp;WMSLayer.&amp;nbsp;&amp;nbsp;I saw code examples here as I wrote above, but he does not want to be friends with angular.&amp;nbsp;If it were easy, I wouldn't be posting on the forum. Possible&amp;nbsp;get out to come up with all sorts of tricks, write additional services and assign&amp;nbsp;WMSLayer with new&amp;nbsp;sublayers by selected Name.&amp;nbsp;But there is no beautiful and optimal solution yet. Only everything topsy-turvy. Despite the fact that properties exist and they can be controlled in some way. But there is no explanation. Unfortunately.&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 12 Sep 2022 07:58:35 GMT</pubDate>
    <dc:creator>DimaY</dc:creator>
    <dc:date>2022-09-12T07:58:35Z</dc:date>
    <item>
      <title>WMSLayer sublayers how determine dynamically, for example, by choosing from list of all possible values ​​that I know.</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/wmslayer-sublayers-how-determine-dynamically-for/m-p/1209102#M78567</link>
      <description>&lt;P&gt;Please tell me how can determine it not initially, but dynamically, for example, by choosing from a list of all possible values ​​that I know.&amp;nbsp; &amp;nbsp;Not as shown in the code&amp;nbsp; const layer= new WMSLayer({&lt;BR /&gt;url: "MyGeoserverUrl",&lt;BR /&gt;sublayers: [{ name: "World" }],&lt;BR /&gt;});&amp;nbsp; &amp;nbsp;&amp;nbsp;This is very understandable.&amp;nbsp; &amp;nbsp;The question is whether it is possible to change this property on the go by choosing any value from the built interface. For example, there are such layers list {"World","Name1","Name2"}.&amp;nbsp; When i choose&amp;nbsp;"Name2"&amp;nbsp;So write like this&amp;nbsp;layer.sublayers = ...&amp;nbsp; //code.&amp;nbsp; &amp;nbsp;&lt;/P&gt;&lt;P&gt;There was already a similar topic, but no one could give a clear answer. Apparently no one knows. Although I saw an example in the documentation that they write this way in the code. But the code doesn't work at all! I am using Angular.&lt;/P&gt;&lt;P&gt;And in addition, a very important question on the same topic.&amp;nbsp; There is such a great example&amp;nbsp;&lt;SPAN&gt;Learn how to change the&amp;nbsp;&lt;/SPAN&gt;basemap layer&lt;SPAN&gt;&amp;nbsp;in a&amp;nbsp;&lt;/SPAN&gt;map&lt;SPAN&gt;.&lt;/SPAN&gt; &lt;A href="https://developers.arcgis.com/javascript/latest/change-the-basemap-layer/#create-a-new-pen" target="_blank" rel="noopener"&gt;https://developers.arcgis.com/javascript/latest/change-the-basemap-layer/#create-a-new-pen&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Is it even possible to do something similar for 3D WMSLayer?&lt;/P&gt;&lt;P&gt;I beg you, thank you very much and I really hope that someone knows and answers, please!&lt;/P&gt;</description>
      <pubDate>Fri, 02 Sep 2022 12:33:47 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/wmslayer-sublayers-how-determine-dynamically-for/m-p/1209102#M78567</guid>
      <dc:creator>DimaY</dc:creator>
      <dc:date>2022-09-02T12:33:47Z</dc:date>
    </item>
    <item>
      <title>Re: WMSLayer sublayers how determine dynamically, for example, by choosing from list of all possible values ​​that I know.</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/wmslayer-sublayers-how-determine-dynamically-for/m-p/1209665#M78586</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/611047"&gt;@DimaY&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If you're building a UI element to swap between various sublayers, I recommend to work with the sublayer visibility.&amp;nbsp;Here's a sample app:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://codepen.io/gsoosalu/pen/bGMNveY" target="_blank"&gt;https://codepen.io/gsoosalu/pen/bGMNveY&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Hope this helps you further. Let me know if you run into any further issues.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 05 Sep 2022 12:41:23 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/wmslayer-sublayers-how-determine-dynamically-for/m-p/1209665#M78586</guid>
      <dc:creator>GreteSoosalu</dc:creator>
      <dc:date>2022-09-05T12:41:23Z</dc:date>
    </item>
    <item>
      <title>Re: WMSLayer sublayers how determine dynamically, for example, by choosing from list of all possible values ​​that I know.</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/wmslayer-sublayers-how-determine-dynamically-for/m-p/1211506#M78670</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Thank you very much for your attention and your response. This is a very good idea! But...&amp;nbsp; &amp;nbsp;In code to make just visible true to Sublayer, every time you need to run through the cycle of all layers and look for it by name.&amp;nbsp;&amp;nbsp;Which is very very slow, long and inefficient. Really much easier just to change&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;sublayers for&amp;nbsp;WMSLayer.&amp;nbsp;&amp;nbsp;I saw code examples here as I wrote above, but he does not want to be friends with angular.&amp;nbsp;If it were easy, I wouldn't be posting on the forum. Possible&amp;nbsp;get out to come up with all sorts of tricks, write additional services and assign&amp;nbsp;WMSLayer with new&amp;nbsp;sublayers by selected Name.&amp;nbsp;But there is no beautiful and optimal solution yet. Only everything topsy-turvy. Despite the fact that properties exist and they can be controlled in some way. But there is no explanation. Unfortunately.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 12 Sep 2022 07:58:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/wmslayer-sublayers-how-determine-dynamically-for/m-p/1211506#M78670</guid>
      <dc:creator>DimaY</dc:creator>
      <dc:date>2022-09-12T07:58:35Z</dc:date>
    </item>
  </channel>
</rss>

