<?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 eMapSwitcher - autoswitchtoscale in ArcGIS Viewer for Flex Questions</title>
    <link>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/emapswitcher-autoswitchtoscale/m-p/310230#M9080</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Lovin' the forcescaleonswitch and autoswitchtoscale features of the emapSwitcher - this is very useful when Esri's basemaps only go to 1:4000...&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The tiled Esri basemaps I am using only go to 1:4513 but I need to make my map zoom to a scale of 1:564.&amp;nbsp; So, what I am doing, which works not too badly, is once I hit 1:2256 i use autoswitchtoscale to make sure Esri's Topo layer is selected (as dynamic) - this at least gives me a white background I can work with to overlay some of my own layers.&amp;nbsp; This works all the way down to 1:564.&amp;nbsp; What I need to do is be able to automatically have the dynamic version of the topo switch to tiled at 1:4513 when the user zooms back out...so pretty much the same method as autoswitchtoscale except that it also works in reverse when zooming back out.&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Or, does anyone have any suggestions to make sure the 'Image not yet available' never appears while at the same time autoamtically showing at least some sort of white background to overlay my operational layers on.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 18 Sep 2012 16:34:07 GMT</pubDate>
    <dc:creator>philippschnetzer</dc:creator>
    <dc:date>2012-09-18T16:34:07Z</dc:date>
    <item>
      <title>eMapSwitcher - autoswitchtoscale</title>
      <link>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/emapswitcher-autoswitchtoscale/m-p/310230#M9080</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Lovin' the forcescaleonswitch and autoswitchtoscale features of the emapSwitcher - this is very useful when Esri's basemaps only go to 1:4000...&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The tiled Esri basemaps I am using only go to 1:4513 but I need to make my map zoom to a scale of 1:564.&amp;nbsp; So, what I am doing, which works not too badly, is once I hit 1:2256 i use autoswitchtoscale to make sure Esri's Topo layer is selected (as dynamic) - this at least gives me a white background I can work with to overlay some of my own layers.&amp;nbsp; This works all the way down to 1:564.&amp;nbsp; What I need to do is be able to automatically have the dynamic version of the topo switch to tiled at 1:4513 when the user zooms back out...so pretty much the same method as autoswitchtoscale except that it also works in reverse when zooming back out.&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Or, does anyone have any suggestions to make sure the 'Image not yet available' never appears while at the same time autoamtically showing at least some sort of white background to overlay my operational layers on.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Sep 2012 16:34:07 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/emapswitcher-autoswitchtoscale/m-p/310230#M9080</guid>
      <dc:creator>philippschnetzer</dc:creator>
      <dc:date>2012-09-18T16:34:07Z</dc:date>
    </item>
    <item>
      <title>Re: eMapSwitcher - autoswitchtoscale</title>
      <link>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/emapswitcher-autoswitchtoscale/m-p/310231#M9081</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Phillip,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; In Flex Viewer 3.0 all layers now support a maxscale and minscale attribute in the main config.xml. You could use those and the optional sixth color in the main config.xml (set to white).&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Sep 2012 16:45:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/emapswitcher-autoswitchtoscale/m-p/310231#M9081</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2012-09-18T16:45:28Z</dc:date>
    </item>
    <item>
      <title>Re: eMapSwitcher - autoswitchtoscale</title>
      <link>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/emapswitcher-autoswitchtoscale/m-p/310232#M9082</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Genius! Thanks, Robert!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Sep 2012 17:34:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/emapswitcher-autoswitchtoscale/m-p/310232#M9082</guid>
      <dc:creator>philippschnetzer</dc:creator>
      <dc:date>2012-09-18T17:34:26Z</dc:date>
    </item>
    <item>
      <title>Re: eMapSwitcher - autoswitchtoscale</title>
      <link>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/emapswitcher-autoswitchtoscale/m-p/310233#M9083</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;Uisng a combination of minscale, maxscale, autswitchtoscale and forcescaleonswitch I have my basemaps configured almost the way i want.&amp;nbsp; The only problem where a user may get confused is the fact that the aerial basemap image can be clicked in the basemap chooser at a scale of 1:100000, for example) and the screen just turns white (because I have the aerial minscale set to 36000).&amp;nbsp; What would be ideal is if the forcescaleonswitch worked in both directions; right now i have forcescaleonswitch set to 4500 so that when you're zoomed in to 1000 and just see a white background and you click aerial it takes you to 4500 where the aerial is available.&amp;nbsp; Could this be made to also zoom in to 36000 when the scale is larger than 36000 (ie, if you are at 200,000 and you click aerial it zooms to 36000).&amp;nbsp; Or, could the aerial thumbnail just be removed from the basemap choose box until the scale has reached 36000? &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This is what my config looks like:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&amp;lt;layer label="Aerial&amp;nbsp; (36,111 and below)"&amp;nbsp;&amp;nbsp;&amp;nbsp; type="tiled" visible="false" maxscale="4513.9887049999998" minscale="36111.909643" forcescaleonswitch="4513.9887049999998" autoswitchtoscale="36111.909643"
&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;&amp;nbsp;&amp;nbsp;&amp;nbsp; icon="assets/images/aerial.png" 
&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;&amp;nbsp;&amp;nbsp;&amp;nbsp; url="http://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer"/&amp;gt;
&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;&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;&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;&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;layer label="Topo&amp;nbsp; (72,223 and above)"&amp;nbsp;&amp;nbsp;&amp;nbsp; type="tiled" visible="true" maxscale="72223.819286"&amp;nbsp; forcescaleonswitch="72223.819286" autoswitchtoscale="72223.819286"
&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;&amp;nbsp;&amp;nbsp;&amp;nbsp; icon="assets/images/topo.png" 
&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;&amp;nbsp;&amp;nbsp;&amp;nbsp; url="http://server.arcgisonline.com/ArcGIS/rest/services/World_Topo_Map/MapServer"/&amp;gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thank you!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 14:50:30 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/emapswitcher-autoswitchtoscale/m-p/310233#M9083</guid>
      <dc:creator>philippschnetzer</dc:creator>
      <dc:date>2021-12-11T14:50:30Z</dc:date>
    </item>
    <item>
      <title>Re: eMapSwitcher - autoswitchtoscale</title>
      <link>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/emapswitcher-autoswitchtoscale/m-p/310234#M9084</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;As stated above, I'm using the eMapSwitcher and trying to force the map to zoom in to 36000 if the aerial basemap ic clicked and the current scale is greater than 36000.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I've added the following to emapSwitcherWidget.mxml thinking it would do the trick, but it does nothing...any ideas?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;private function basemapButtonBar_changeHandler(event:IndexChangeEvent):void
&amp;nbsp;&amp;nbsp; {
&amp;nbsp;&amp;nbsp;&amp;nbsp; var layers:ArrayCollection = map.layers as ArrayCollection;
&amp;nbsp;&amp;nbsp;&amp;nbsp; basemapsButtonBar.fader.value = event.newIndex + 1;
&amp;nbsp;&amp;nbsp;&amp;nbsp; for (var x:int = 0; x &amp;lt; basemapList.length; x++){
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var basemapLabel:String = basemapList.getItemAt(x).label;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; for each (var layer:Layer in layers){
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(basemapList.getItemAt(event.newIndex).label != basemapLabel)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(layer.id == basemapLabel)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; layer.visible = false;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(layer.id == basemapLabel)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; layer.alpha = 1;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }
&amp;nbsp;&amp;nbsp;&amp;nbsp; }
&amp;nbsp;&amp;nbsp;&amp;nbsp; if(basemapList.getItemAt(event.newIndex).forcescaleonswitch &amp;amp;&amp;amp; map.scale &amp;lt; basemapList.getItemAt(event.newIndex).forcescaleonswitch){
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; map.scale = basemapList.getItemAt(event.newIndex).forcescaleonswitch;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /* if(basemapList.getItemAt(basemapSelectionComponent.selectedIndex).label == "myspecialbasemap"){
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; map.centerAt(new MapPoint(x,y, map.spatialReference));
&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;&amp;nbsp; &lt;STRONG&gt;if(basemapList.getItemAt(basemapSelectionComponent.selectedIndex).label == "Aerial&amp;nbsp; (36,111 and below)" &amp;amp;&amp;amp; map.scale &amp;gt; 36111.909643)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; map.scale = 36111.909643;&lt;/STRONG&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; }
&amp;nbsp;&amp;nbsp;&amp;nbsp; AppEvent.dispatch(AppEvent.BASEMAP_SWITCH, basemapList.getItemAt(event.newIndex).id);
&amp;nbsp;&amp;nbsp; }&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Is it perhaps that my added code is interfering with the forcescaleonswitch code?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 16:19:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/emapswitcher-autoswitchtoscale/m-p/310234#M9084</guid>
      <dc:creator>philippschnetzer</dc:creator>
      <dc:date>2021-12-12T16:19:35Z</dc:date>
    </item>
  </channel>
</rss>

