Select to view content in your preferred language

Auto basemap switch as scale change - Again

679
6
Jump to solution
08-10-2012 05:58 AM
ShaningYu
Honored Contributor
In my thread at http://forums.arcgis.com/threads/63288-Map-switch-as-scale-change, I requested how to auto-switch basemap as scale change.  Mr. Robert, the author (also the best ArcGIS Flex expert as I know) of the eMapSwitch, provided me the solution.  It works if I make the scale change using the Scalebar to zoom-in.
In one of my application, when a feature (e.g. a parcel) is found and then the map is zoommed-in the parcel.  The scale is changed to 1:1128 (the smallest scale),  but the basemap is on the default one US Areial that does not have the map at this scale.  How can the auto-switch basemap also work on this senario? 
Another question is how auto-switch to for zoom-out with the default basemap.
Thanks.
Tags (2)
0 Kudos
1 Solution

Accepted Solutions
RhettZufelt
MVP Notable Contributor
Robert,

I noticed in the version 3 eMapSwitcherWidget that the following tags are not in the readme/xml, but are supported by the mxml.


<expandlayeritems>true</expandlayeritems>     <labels>     <basemapslabel>Basemaps</basemapslabel>     <layerlistlabel>More...</layerlistlabel>     </labels>


Figured they got overlooked in the readme updates.

R_

View solution in original post

0 Kudos
6 Replies
RobertScheitlin__GISP
MVP Emeritus
Shanning,

    There are two option in the eMapSwitcherWidget that are doumented in the ReadMe.txt (I know most people don't even consider reading the documentation when they can just have some one tell them what to do...). They are the autoswitchtoscale and forcescaleonswitch.
0 Kudos
ShaningYu
Honored Contributor
Actually, I tested both autoswitch and foreswitch, but some results are not expected.  For instance, I set autoswitch on US Aerial.  If I change scale to 1:1128, the background displays 'Map Data Not Yet Available' even though the eMapSwitch tab shows it is on US Aerial (the default basemap).  I have to click the US Aerial again and then the autoswitch functions well (to the right basemap I set).
When I play Zoom-out, it always displays US Shaded Relief (not the default, neither autoswitch nor foreswitch) even though the eMapSwitch tab shows it is on US Aerial. 
My suspection is that loading Shaded Relief from the server could take shorter time than loading US Aerial probably due to the loading size issue.  This is only my guess.
0 Kudos
RhettZufelt
MVP Notable Contributor
Robert,

I noticed in the version 3 eMapSwitcherWidget that the following tags are not in the readme/xml, but are supported by the mxml.


<expandlayeritems>true</expandlayeritems>     <labels>     <basemapslabel>Basemaps</basemapslabel>     <layerlistlabel>More...</layerlistlabel>     </labels>


Figured they got overlooked in the readme updates.

R_
0 Kudos
ShaningYu
Honored Contributor
Thanks for your response.  In my thread cleanup, I have added the credit to you.
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Rhett,

   Thanks for the info. I have updated the XML and added a eMapSwitcher Widget Configuration.pdf to the download.
0 Kudos
ShaningYu
Honored Contributor
Robert:  Thanks for your update.  Currently, I am working on mainly on Silverlight.  Once I get a chance to work on Flex, I will definitely use the components you have updated.
0 Kudos