Select to view content in your preferred language

Basemap Switcher - Slider

2039
0
07-28-2011 07:39 AM
RobertMueller
Deactivated User
I've taken the code (below) from a previous post (http://forums.arcgis.com/threads/190...t=slider+alpha) that was trying to implement a basemap slider of sorts as found in this website; http://maps.hamiltontn.gov/hcflex/

My question is concerning the placement of this code. This code should be in a widget, similar to the original BaseMap switcher, although evidently lacks the correct "hook" into the map extent. However if put the code into the HeaderControllerWidget, a seperate map appears, but the code works. Can anyone fill in my gap of understanding?

Thanks
Bob


<esri:Map id="MaryMap">

<esri:ArcGISTiledMapServiceLayer
visible="true"
url="http://services.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer"/>
<esri:ArcGISTiledMapServiceLayer
visible="true"
alpha="{Math.max(1-mapTrans.value)}"
url="http://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer" />
<esri:ArcGISTiledMapServiceLayer
visible="true"
alpha="{Math.min(mapTrans.value-1)}"
url="http://server.arcgisonline.com/ArcGIS/rest/services/World_Topo_Map/MapServer" />
</esri:Map>
<s:Group left="10" right="10" top="10" bottom="10">

<s:VSlider
id="mapTrans" width="10"
minimum="0" maximum="2"
snapInterval=".1"
value="1"
liveDragging="true" x="10" y="58">

</s:VSlider>
<s:ToggleButton x="10" y="5" label="Aerial" width="54" height="46"
id="aerialButton"
click="{mapTrans.value=0}" chromeColor="#1293BE"
toolTip="Aerial Photo"/>


<s:ToggleButton x="74" y="5" label="Base Map" width="54" height="46"
id="baseButton"
click="{mapTrans.value=1}"
toolTip="Base Map"/>

<s:ToggleButton x="145" y="5" label="Topo" width="54" height="46"
id="topoButton"
click="{mapTrans.value=2}"
toolTip="Topo Map"/>


</s:Group>
Tags (2)
0 Kudos
0 Replies