<?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 Customize Map Switcher in ArcGIS Viewer for Flex Questions</title>
    <link>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/customize-map-switcher/m-p/338510#M9748</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I would like to add a basemap button in the mapswitcher that is only visible/enabled once the user is zoomed into a certain level. I cannot figure out how to get at the buttons in the button bar to disable the one I want. Has anyone attempted anything like this?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 22 Dec 2010 17:10:00 GMT</pubDate>
    <dc:creator>RyanGillen</dc:creator>
    <dc:date>2010-12-22T17:10:00Z</dc:date>
    <item>
      <title>Customize Map Switcher</title>
      <link>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/customize-map-switcher/m-p/338510#M9748</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I would like to add a basemap button in the mapswitcher that is only visible/enabled once the user is zoomed into a certain level. I cannot figure out how to get at the buttons in the button bar to disable the one I want. Has anyone attempted anything like this?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Dec 2010 17:10:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/customize-map-switcher/m-p/338510#M9748</guid>
      <dc:creator>RyanGillen</dc:creator>
      <dc:date>2010-12-22T17:10:00Z</dc:date>
    </item>
    <item>
      <title>Re: Customize Map Switcher</title>
      <link>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/customize-map-switcher/m-p/338511#M9749</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Ryan,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; Here is some code for disabling/enabling a specific butonbar button:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;private function toggleButton(idx:uint, selected:Boolean):void {
&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;&amp;nbsp;&amp;nbsp; var b3:ButtonBarButton = buttonBar.getChildAt(idx) as ButtonBarButton;
&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;&amp;nbsp;&amp;nbsp; b3.enabled = selected;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }
&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 16:01:18 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/customize-map-switcher/m-p/338511#M9749</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2021-12-11T16:01:18Z</dc:date>
    </item>
    <item>
      <title>Re: Customize Map Switcher</title>
      <link>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/customize-map-switcher/m-p/338512#M9750</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;This is how I was attempting to modify the buttons, but I always get index out of bounds errors. The button I want to modify is the third one, however calling the function you posted giving it 2 as the parameter throws an error. I have 3 basemaps so it should be a valid index. Do I need to listen for a certain event before trying to call that function?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Dec 2010 17:30:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/customize-map-switcher/m-p/338512#M9750</guid>
      <dc:creator>RyanGillen</dc:creator>
      <dc:date>2010-12-22T17:30:14Z</dc:date>
    </item>
    <item>
      <title>Re: Customize Map Switcher</title>
      <link>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/customize-map-switcher/m-p/338513#M9751</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Ryan,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; I am not sure where or when you are calling it but you do have to be sure the the buttonbars dataprovider is set before you try to disable a button.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Dec 2010 17:32:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/customize-map-switcher/m-p/338513#M9751</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2010-12-22T17:32:46Z</dc:date>
    </item>
    <item>
      <title>Re: Customize Map Switcher</title>
      <link>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/customize-map-switcher/m-p/338514#M9752</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Well I tried putting the call to the function in the init function after reading the list of basemaps into the mapList variable, which is bound to the button bar as the data provider. I also tried putting the function call in the creationCompleteHandler and setTbbSelectedIndex functions, both give the same index out of bounds error. I want the button to be disabled inititally, then I will listen for the maps zoom level to change and if the zoom level is in far enough then I will set the button to enabled. I cant figure out where to call the function from so that the button is initially disabled.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Dec 2010 17:40:23 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/customize-map-switcher/m-p/338514#M9752</guid>
      <dc:creator>RyanGillen</dc:creator>
      <dc:date>2010-12-22T17:40:23Z</dc:date>
    </item>
    <item>
      <title>Re: Customize Map Switcher</title>
      <link>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/customize-map-switcher/m-p/338515#M9753</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Ryan,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; You could try adding this to the end of the init function&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;this.callLater(yourDisablefunction);&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Dec 2010 18:00:43 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/customize-map-switcher/m-p/338515#M9753</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2010-12-22T18:00:43Z</dc:date>
    </item>
    <item>
      <title>Re: Customize Map Switcher</title>
      <link>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/customize-map-switcher/m-p/338516#M9754</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks Robert, that worked out. I did have to change this line:&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;var b3:ButtonBarButton = tbb.getChildAt(idx) as ButtonBarButton;&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;To This:&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;var b3:ButtonBarButton = tbb.dataGroup.getElementAt(idx) as ButtonBarButton;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Dec 2010 18:11:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/customize-map-switcher/m-p/338516#M9754</guid>
      <dc:creator>RyanGillen</dc:creator>
      <dc:date>2010-12-22T18:11:22Z</dc:date>
    </item>
    <item>
      <title>Re: Customize Map Switcher</title>
      <link>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/customize-map-switcher/m-p/338517#M9755</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;It is still really flaky even after using the call later function you posted above. Sometimes it works sometimes it errors out trying to get the button from the datagroup. I must be missing something.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Dec 2010 19:02:05 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/customize-map-switcher/m-p/338517#M9755</guid>
      <dc:creator>RyanGillen</dc:creator>
      <dc:date>2010-12-22T19:02:05Z</dc:date>
    </item>
  </channel>
</rss>

