<?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: SFV: Chart Widget - Make Layer Visible when widget is activated. in ArcGIS API for Flex Questions</title>
    <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/sfv-chart-widget-make-layer-visible-when-widget-is/m-p/30275#M693</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Robert,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thank you for this.&amp;nbsp; I have been working with it but I'm unsure where to put the sublayer information the function is refering too. All avenues I have tried will either not get the function to work or not compile.&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Rich&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 10 May 2010 18:14:50 GMT</pubDate>
    <dc:creator>RichWestfall</dc:creator>
    <dc:date>2010-05-10T18:14:50Z</dc:date>
    <item>
      <title>SFV: Chart Widget - Make Layer Visible when widget is activated.</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/sfv-chart-widget-make-layer-visible-when-widget-is/m-p/30269#M687</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hello,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I am using the chart widget to serve up census information.&amp;nbsp; I have the census block layer accessible to the SFV.&amp;nbsp; I would like the census block layer to be visible when the chart widget is activated.&amp;nbsp; When the chart widget is closed or minimized I would like the census block layer invisible.&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Has anyone attempted something similiar?&amp;nbsp; Any help would be appreciated.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Rich&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 May 2010 20:55:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/sfv-chart-widget-make-layer-visible-when-widget-is/m-p/30269#M687</guid>
      <dc:creator>RichWestfall</dc:creator>
      <dc:date>2010-05-05T20:55:35Z</dc:date>
    </item>
    <item>
      <title>Re: SFV: Chart Widget - Make Layer Visible when widget is activated.</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/sfv-chart-widget-make-layer-visible-when-widget-is/m-p/30270#M688</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;richwestfall,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; If the census block layer is in the map the you can just do something like&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_macro_code jive_text_macro"&gt;map.getLayer(yourName).visible = true;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 May 2010 21:39:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/sfv-chart-widget-make-layer-visible-when-widget-is/m-p/30270#M688</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2010-05-05T21:39:29Z</dc:date>
    </item>
    <item>
      <title>Re: SFV: Chart Widget - Make Layer Visible when widget is activated.</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/sfv-chart-widget-make-layer-visible-when-widget-is/m-p/30271#M689</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Robert,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I appreciate the help.&amp;nbsp; I have tried entering the code in the chart widget in the openhandler/closedhandler to no avail.&amp;nbsp; Is there another section I should try this in?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks for your help.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Rich&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 May 2010 14:37:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/sfv-chart-widget-make-layer-visible-when-widget-is/m-p/30271#M689</guid>
      <dc:creator>RichWestfall</dc:creator>
      <dc:date>2010-05-06T14:37:31Z</dc:date>
    </item>
    <item>
      <title>Re: SFV: Chart Widget - Make Layer Visible when widget is activated.</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/sfv-chart-widget-make-layer-visible-when-widget-is/m-p/30272#M690</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Rich,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; Is the layer that you are trying to make visible a sublayer of a map service? If so that requires some more code.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 May 2010 14:52:50 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/sfv-chart-widget-make-layer-visible-when-widget-is/m-p/30272#M690</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2010-05-06T14:52:50Z</dc:date>
    </item>
    <item>
      <title>Re: SFV: Chart Widget - Make Layer Visible when widget is activated.</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/sfv-chart-widget-make-layer-visible-when-widget-is/m-p/30273#M691</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Robert,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Yes it is a grouped layer in a large service.&amp;nbsp; Attached is a pdf showing the location.&amp;nbsp; It is layer id 48.&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Rich&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 May 2010 15:12:41 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/sfv-chart-widget-make-layer-visible-when-widget-is/m-p/30273#M691</guid>
      <dc:creator>RichWestfall</dc:creator>
      <dc:date>2010-05-06T15:12:41Z</dc:date>
    </item>
    <item>
      <title>Re: SFV: Chart Widget - Make Layer Visible when widget is activated.</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/sfv-chart-widget-make-layer-visible-when-widget-is/m-p/30274#M692</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Rich,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; Here is two function to use one for hiding the sublayer one for showing&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;private hideSubLayer(layer:Layer,id:int):void
&amp;nbsp;&amp;nbsp; {
&amp;nbsp;&amp;nbsp;&amp;nbsp; var visibleLayers:ArrayCollection;
&amp;nbsp;&amp;nbsp;&amp;nbsp; if (layer is ArcGISDynamicMapServiceLayer)
&amp;nbsp;&amp;nbsp;&amp;nbsp; {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; visibleLayers = ArcGISDynamicMapServiceLayer(layer).visibleLayers;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var idIndex:int = visibleLayers.getItemIndex(id);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (idIndex != -1)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; visibleLayers.removeItemAt(idIndex);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }
&amp;nbsp;&amp;nbsp;&amp;nbsp; }
&amp;nbsp;&amp;nbsp; }
&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp; private showSubLayer(layer:Layer,id:int):void
&amp;nbsp;&amp;nbsp; {
&amp;nbsp;&amp;nbsp;&amp;nbsp; var visibleLayers:ArrayCollection;
&amp;nbsp;&amp;nbsp;&amp;nbsp; if (layer is ArcGISDynamicMapServiceLayer)
&amp;nbsp;&amp;nbsp;&amp;nbsp; {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; visibleLayers = ArcGISDynamicMapServiceLayer(layer).visibleLayers;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; visibleLayers.addItem(id);
&amp;nbsp;&amp;nbsp;&amp;nbsp; }
&amp;nbsp;&amp;nbsp; }&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Dec 2021 21:12:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/sfv-chart-widget-make-layer-visible-when-widget-is/m-p/30274#M692</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2021-12-10T21:12:56Z</dc:date>
    </item>
    <item>
      <title>Re: SFV: Chart Widget - Make Layer Visible when widget is activated.</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/sfv-chart-widget-make-layer-visible-when-widget-is/m-p/30275#M693</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Robert,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thank you for this.&amp;nbsp; I have been working with it but I'm unsure where to put the sublayer information the function is refering too. All avenues I have tried will either not get the function to work or not compile.&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Rich&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 May 2010 18:14:50 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/sfv-chart-widget-make-layer-visible-when-widget-is/m-p/30275#M693</guid>
      <dc:creator>RichWestfall</dc:creator>
      <dc:date>2010-05-10T18:14:50Z</dc:date>
    </item>
    <item>
      <title>Re: SFV: Chart Widget - Make Layer Visible when widget is activated.</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/sfv-chart-widget-make-layer-visible-when-widget-is/m-p/30276#M694</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Rich,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; Hmm. Have you tried something like&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_macro_code jive_text_macro"&gt;showSubLayer(map.getLayer("Planning"),48);&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 May 2010 18:25:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/sfv-chart-widget-make-layer-visible-when-widget-is/m-p/30276#M694</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2010-05-10T18:25:44Z</dc:date>
    </item>
    <item>
      <title>Re: SFV: Chart Widget - Make Layer Visible when widget is activated.</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/sfv-chart-widget-make-layer-visible-when-widget-is/m-p/30277#M695</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Robert,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Yes I have tried that and the error is need rightpar before dot.&amp;nbsp; I have also tried the following attached code and don't get and error message it just hangs flex builder and will not compile the chart widget.&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Rich&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;private function hideSubLayer (map.getLayer("Planning"),48):void
&amp;nbsp;&amp;nbsp; {
&amp;nbsp;&amp;nbsp;&amp;nbsp; var visibleLayers:ArrayCollection;
&amp;nbsp;&amp;nbsp;&amp;nbsp; if (layer is ArcGISDynamicMapServiceLayer)
&amp;nbsp;&amp;nbsp;&amp;nbsp; {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; visibleLayers = ArcGISDynamicMapServiceLayer(layer).visibleLayers;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var idIndex:int = visibleLayers.getItemIndex(id);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (idIndex != -1)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; visibleLayers.removeItemAt(idIndex);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }
&amp;nbsp;&amp;nbsp;&amp;nbsp; }
&amp;nbsp;&amp;nbsp; }
&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp; private function showSubLayer (map.getLayer("Planning"),48):void
&amp;nbsp;&amp;nbsp; {
&amp;nbsp;&amp;nbsp;&amp;nbsp; var visibleLayers:ArrayCollection;
&amp;nbsp;&amp;nbsp;&amp;nbsp; if (layer is ArcGISDynamicMapServiceLayer)
&amp;nbsp;&amp;nbsp;&amp;nbsp; {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; visibleLayers = ArcGISDynamicMapServiceLayer(layer).visibleLayers;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; visibleLayers.addItem(id);
&amp;nbsp;&amp;nbsp;&amp;nbsp; }
&amp;nbsp;&amp;nbsp; }&amp;nbsp; &lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Dec 2021 21:12:59 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/sfv-chart-widget-make-layer-visible-when-widget-is/m-p/30277#M695</guid>
      <dc:creator>RichWestfall</dc:creator>
      <dc:date>2021-12-10T21:12:59Z</dc:date>
    </item>
    <item>
      <title>Re: SFV: Chart Widget - Make Layer Visible when widget is activated.</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/sfv-chart-widget-make-layer-visible-when-widget-is/m-p/30278#M696</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;richwestfall,&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; If the census block layer is in the map the you can just do something like&lt;BR /&gt;&lt;BR /&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_macro_code jive_text_macro"&gt;map.getLayer(yourName).visible = true;&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;With the chart widget, where would I put this in the mxml? I have tried under the widgetOpenHandler but had no success.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 Jul 2010 19:40:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/sfv-chart-widget-make-layer-visible-when-widget-is/m-p/30278#M696</guid>
      <dc:creator>MichaelHoff</dc:creator>
      <dc:date>2010-07-01T19:40:14Z</dc:date>
    </item>
  </channel>
</rss>

