<?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: how to hide layers based on layer name..... in ArcGIS API for Flex Questions</title>
    <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/how-to-hide-layers-based-on-layer-name/m-p/388328#M9077</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;You could try something like this.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
 
&lt;STRONG style=": ; color: #6699cc; font-size: 2;"&gt;var &lt;/STRONG&gt;&lt;SPAN style="font-size:2;"&gt;lArr:Array = yourServceID.layerInfos;&lt;/SPAN&gt;

[LEFT]&lt;STRONG style=": ; color: #0033ff; font-size: 2;"&gt;for&lt;/STRONG&gt;&lt;STRONG style=": ; color: #0033ff; font-size: 2;"&gt;each&lt;/STRONG&gt;&lt;SPAN style="font-size:2;"&gt; (&lt;/SPAN&gt;&lt;STRONG style=": ; color: #6699cc; font-size: 2;"&gt;var&lt;/STRONG&gt;&lt;SPAN style="font-size:2;"&gt; layerInfo:LayerInfo &lt;/SPAN&gt;&lt;STRONG style=": ; color: #0033ff; font-size: 2;"&gt;in&lt;/STRONG&gt;&lt;SPAN style="font-size:2;"&gt; lArr){&lt;/SPAN&gt;

&lt;STRONG style=": ; color: #6699cc; font-size: 2;"&gt; var&lt;/STRONG&gt;&lt;SPAN style="font-size:2;"&gt; idIndex:int = yourServceID.visibleLayers.getItemIndex(layerInfo.id);&lt;/SPAN&gt;
&lt;STRONG style=": ; color: #0033ff; font-size: 2;"&gt; if&lt;/STRONG&gt;&lt;SPAN style="font-size:2;"&gt;(layerInfo.name == &lt;/SPAN&gt;&lt;STRONG style=": ; color: #990000; font-size: 2;"&gt;txtBox.text)&lt;/STRONG&gt;
&lt;SPAN style="font-size:2;"&gt;&amp;nbsp;&amp;nbsp; yourServceID.visibleLayers.removeItemAt(idIndex);&lt;/SPAN&gt;



&lt;SPAN style="font-size:2;"&gt;} &lt;/SPAN&gt;[/LEFT]
&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 11 Dec 2021 17:50:14 GMT</pubDate>
    <dc:creator>CaseyBentz</dc:creator>
    <dc:date>2021-12-11T17:50:14Z</dc:date>
    <item>
      <title>how to hide layers based on layer name.....</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/how-to-hide-layers-based-on-layer-name/m-p/388327#M9076</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I want to hide some feature layers from map based on name.Here user enter the name of the layer in textbox and click the hide button.., When ever user click the hide button the particular featurelayer has to be unvisible.....&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thank you.........&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Dec 2010 08:34:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/how-to-hide-layers-based-on-layer-name/m-p/388327#M9076</guid>
      <dc:creator>srinivasreddy</dc:creator>
      <dc:date>2010-12-06T08:34:28Z</dc:date>
    </item>
    <item>
      <title>Re: how to hide layers based on layer name.....</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/how-to-hide-layers-based-on-layer-name/m-p/388328#M9077</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;You could try something like this.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
 
&lt;STRONG style=": ; color: #6699cc; font-size: 2;"&gt;var &lt;/STRONG&gt;&lt;SPAN style="font-size:2;"&gt;lArr:Array = yourServceID.layerInfos;&lt;/SPAN&gt;

[LEFT]&lt;STRONG style=": ; color: #0033ff; font-size: 2;"&gt;for&lt;/STRONG&gt;&lt;STRONG style=": ; color: #0033ff; font-size: 2;"&gt;each&lt;/STRONG&gt;&lt;SPAN style="font-size:2;"&gt; (&lt;/SPAN&gt;&lt;STRONG style=": ; color: #6699cc; font-size: 2;"&gt;var&lt;/STRONG&gt;&lt;SPAN style="font-size:2;"&gt; layerInfo:LayerInfo &lt;/SPAN&gt;&lt;STRONG style=": ; color: #0033ff; font-size: 2;"&gt;in&lt;/STRONG&gt;&lt;SPAN style="font-size:2;"&gt; lArr){&lt;/SPAN&gt;

&lt;STRONG style=": ; color: #6699cc; font-size: 2;"&gt; var&lt;/STRONG&gt;&lt;SPAN style="font-size:2;"&gt; idIndex:int = yourServceID.visibleLayers.getItemIndex(layerInfo.id);&lt;/SPAN&gt;
&lt;STRONG style=": ; color: #0033ff; font-size: 2;"&gt; if&lt;/STRONG&gt;&lt;SPAN style="font-size:2;"&gt;(layerInfo.name == &lt;/SPAN&gt;&lt;STRONG style=": ; color: #990000; font-size: 2;"&gt;txtBox.text)&lt;/STRONG&gt;
&lt;SPAN style="font-size:2;"&gt;&amp;nbsp;&amp;nbsp; yourServceID.visibleLayers.removeItemAt(idIndex);&lt;/SPAN&gt;



&lt;SPAN style="font-size:2;"&gt;} &lt;/SPAN&gt;[/LEFT]
&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 17:50:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/how-to-hide-layers-based-on-layer-name/m-p/388328#M9077</guid>
      <dc:creator>CaseyBentz</dc:creator>
      <dc:date>2021-12-11T17:50:14Z</dc:date>
    </item>
  </channel>
</rss>

