<?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: get rid of a layer in a map without deleting it in server? in ArcGIS API for Flex Questions</title>
    <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/get-rid-of-a-layer-in-a-map-without-deleting-it-in/m-p/374165#M8738</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;This isn't currently supported. It would require customization to the TOC component inside the com.esri.viewer.components.toc package.&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Since it's not supported, I gave up the trying on that. Thanks for telling me. But that feature might be really helpful if it is supported someday&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 20 Jan 2011 17:19:51 GMT</pubDate>
    <dc:creator>GeorgiannaStrode</dc:creator>
    <dc:date>2011-01-20T17:19:51Z</dc:date>
    <item>
      <title>get rid of a layer in a map without deleting it in server?</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/get-rid-of-a-layer-in-a-map-without-deleting-it-in/m-p/374156#M8729</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;A quick question:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;How can I get rid of a layer in a Flex application(not to show up), but keep it in the map server and ArcMap software?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I think it might be some codes in config.xml file, in these following lines:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;lt;map&amp;gt;
&amp;lt;operationallayers&amp;gt;
 
&amp;nbsp;&amp;nbsp; &amp;lt;layer url="..." /&amp;gt;
 
 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/operationallayers&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/map&amp;gt;&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;probably I can add some lines such as &amp;lt;exclude .. &amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Anyone having any ideas on that? Thanks in advance&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 Jan 2011 20:37:39 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/get-rid-of-a-layer-in-a-map-without-deleting-it-in/m-p/374156#M8729</guid>
      <dc:creator>GeorgiannaStrode</dc:creator>
      <dc:date>2011-01-14T20:37:39Z</dc:date>
    </item>
    <item>
      <title>Re: get rid of a layer in a map without deleting it in server?</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/get-rid-of-a-layer-in-a-map-without-deleting-it-in/m-p/374157#M8730</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;If the layer type is dynamic, arcims or wms, you can set the visiblelayers in the layer tag to only the layers you want to be on.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;See:&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://help.arcgis.com/en/webapps/flexviewer/help/layer_tag.htm"&gt;http://help.arcgis.com/en/webapps/flexviewer/help/layer_tag.htm&lt;/A&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 Jan 2011 21:30:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/get-rid-of-a-layer-in-a-map-without-deleting-it-in/m-p/374157#M8730</guid>
      <dc:creator>DasaPaddock</dc:creator>
      <dc:date>2011-01-14T21:30:22Z</dc:date>
    </item>
    <item>
      <title>Re: get rid of a layer in a map without deleting it in server?</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/get-rid-of-a-layer-in-a-map-without-deleting-it-in/m-p/374158#M8731</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I used to write codes like: &lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&amp;lt;layer label="Control Points" type="dynamic" visible="true" alpha="1"
&amp;nbsp;&amp;nbsp; url=".../MapServer" /&amp;gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;SPAN&gt;and this enabled me to have assess to all the layers in the mapserver. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Now that I tried:&lt;/SPAN&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&amp;lt;layer label="Control Points" type="dynamic" visible="true" alpha="1"
&amp;nbsp;&amp;nbsp; url=".../MapServer/1" /&amp;gt;
&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;layer label="Control Points" type="dynamic" visible="false" alpha="1"
&amp;nbsp;&amp;nbsp; url=".../MapServer/2" /&amp;gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;but in this way no layer come out. Is there anyway to split these layers up and set the visible attribute of them separately?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 17:18:40 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/get-rid-of-a-layer-in-a-map-without-deleting-it-in/m-p/374158#M8731</guid>
      <dc:creator>GeorgiannaStrode</dc:creator>
      <dc:date>2021-12-11T17:18:40Z</dc:date>
    </item>
    <item>
      <title>Re: get rid of a layer in a map without deleting it in server?</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/get-rid-of-a-layer-in-a-map-without-deleting-it-in/m-p/374159#M8732</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;You can control which layers are visible in the service like this:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&amp;lt;layer label="Control Points" type="dynamic" visible="true" alpha="1"
&amp;nbsp;&amp;nbsp; url=".../MapServer" visiblelayers="0,1,2" /&amp;gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 17:18:43 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/get-rid-of-a-layer-in-a-map-without-deleting-it-in/m-p/374159#M8732</guid>
      <dc:creator>DasaPaddock</dc:creator>
      <dc:date>2021-12-11T17:18:43Z</dc:date>
    </item>
    <item>
      <title>Re: get rid of a layer in a map without deleting it in server?</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/get-rid-of-a-layer-in-a-map-without-deleting-it-in/m-p/374160#M8733</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;actually the difference made by &lt;/SPAN&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_macro_code jive_text_macro"&gt;visiblelayers="0,1,2"&lt;/PRE&gt;&lt;SPAN&gt; is just to choose which layers to be on, and which to be off by default. I want those layers to not just be off, but not in the list at all. But for some reason, I dont wanna delete them in the server and ArcMap.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Jan 2011 19:08:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/get-rid-of-a-layer-in-a-map-without-deleting-it-in/m-p/374160#M8733</guid>
      <dc:creator>GeorgiannaStrode</dc:creator>
      <dc:date>2011-01-18T19:08:28Z</dc:date>
    </item>
    <item>
      <title>Re: get rid of a layer in a map without deleting it in server?</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/get-rid-of-a-layer-in-a-map-without-deleting-it-in/m-p/374161#M8734</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;This isn't currently supported. It would require customization to the TOC component inside the com.esri.viewer.components.toc package.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Jan 2011 19:53:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/get-rid-of-a-layer-in-a-map-without-deleting-it-in/m-p/374161#M8734</guid>
      <dc:creator>DasaPaddock</dc:creator>
      <dc:date>2011-01-18T19:53:46Z</dc:date>
    </item>
    <item>
      <title>Re: get rid of a layer in a map without deleting it in server?</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/get-rid-of-a-layer-in-a-map-without-deleting-it-in/m-p/374162#M8735</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Dasa,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; So you guys have no plan to add layerDefinitions support to applicable layers in the viewer?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Jan 2011 20:07:43 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/get-rid-of-a-layer-in-a-map-without-deleting-it-in/m-p/374162#M8735</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2011-01-18T20:07:43Z</dc:date>
    </item>
    <item>
      <title>Re: get rid of a layer in a map without deleting it in server?</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/get-rid-of-a-layer-in-a-map-without-deleting-it-in/m-p/374163#M8736</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Dasa,&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; So you guys have no plan to add layerDefinitions support to applicable layers in the viewer?&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;You can set a definitionexpression on a "feature" layer, but we haven't had requests to add support for this to the config for "dynamic" layers. Would you have a use for this? I don't think it would help with what I think Georgianna is looking for.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Jan 2011 20:19:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/get-rid-of-a-layer-in-a-map-without-deleting-it-in/m-p/374163#M8736</guid>
      <dc:creator>DasaPaddock</dc:creator>
      <dc:date>2011-01-18T20:19:44Z</dc:date>
    </item>
    <item>
      <title>Re: get rid of a layer in a map without deleting it in server?</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/get-rid-of-a-layer-in-a-map-without-deleting-it-in/m-p/374164#M8737</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Dasa,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; OK, thanks for the info I just thought that if the layer had a layerDefinition then the toc would honor that as well and not show the other layers of the map service.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Jan 2011 20:24:59 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/get-rid-of-a-layer-in-a-map-without-deleting-it-in/m-p/374164#M8737</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2011-01-18T20:24:59Z</dc:date>
    </item>
    <item>
      <title>Re: get rid of a layer in a map without deleting it in server?</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/get-rid-of-a-layer-in-a-map-without-deleting-it-in/m-p/374165#M8738</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;This isn't currently supported. It would require customization to the TOC component inside the com.esri.viewer.components.toc package.&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Since it's not supported, I gave up the trying on that. Thanks for telling me. But that feature might be really helpful if it is supported someday&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 20 Jan 2011 17:19:51 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/get-rid-of-a-layer-in-a-map-without-deleting-it-in/m-p/374165#M8738</guid>
      <dc:creator>GeorgiannaStrode</dc:creator>
      <dc:date>2011-01-20T17:19:51Z</dc:date>
    </item>
    <item>
      <title>Re: get rid of a layer in a map without deleting it in server?</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/get-rid-of-a-layer-in-a-map-without-deleting-it-in/m-p/374166#M8739</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Not sure if this is what you're looking for but I figured out a way to dynamically add and remove layers from my TOC. Let's say you want remove a dynamic layer with id="counties" and add a dynamic layer with id="roads". Create the variable lyrs that lists all the maps layer IDs. Loop through the list and if counties is there remove it (it will no longer appear in the TOC). Then add the roads layer (it will show up in the TOC). The second function does the opposite. It actually doesn't matter what kind of map service you have (dynamic, tiled, etc.) as long as you give it an id. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I don't know where this fits in with the sample viewer but it works in my app.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;A href="http://50.18.62.210/DevByDesign/"&gt;http://50.18.62.210/DevByDesign/&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;private function switchLayers():void{&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; var lyrs:Array = myMap.layerIds;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; for each(var lyr:String in lyrs){&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (lyr == "counties"){myMap.removeLayer(counties)}&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; myMap.addLayer(roads);}&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;private function switchLayers1():void{&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; var lyrs:Array = myMap.layerIds;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; for each(var lyr:String in lyrs){&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (lyr == "counties"){myMap.removeLayer(roads)}&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; myMap.addLayer(counties);}&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Casey Schneebeck&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The Nature Conservancy&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Boulder, CO&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 May 2011 15:01:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/get-rid-of-a-layer-in-a-map-without-deleting-it-in/m-p/374166#M8739</guid>
      <dc:creator>CaseySchneebeck</dc:creator>
      <dc:date>2011-05-12T15:01:31Z</dc:date>
    </item>
  </channel>
</rss>

