Select to view content in your preferred language

Enhanced Map Switcher Widget

6786
37
10-27-2011 12:38 PM
JeffreyUtter
Deactivated User
Robert........
I really like this widget, but I have 2 issues with it.
First, the widget causes a white line across the map. It's not there if I remove the widget.
Second, the labeling dropdowns from the top toolbar widgets are covered up from the basemap/Enhanced Map Switcher Widget. Again, if I remove the Enhanced Map Switcher Widget, the dropdown labels can be seen over the top of the basemaps.
Please advise.
Jeff
Tags (2)
0 Kudos
37 Replies
trannoyronan
Emerging Contributor
thank you
i haven't found it
0 Kudos
MattEitrem
Regular Contributor
Trannoy,

   Sure that is defined in the Main Config.xml file by adding the icon attribute:

            <layer label="Streets" type="tiled" visible="true"  alpha="1" icon="assets/images/basemap_streets.jpg"
                        url="http://server.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer"/>



Don't forget to click the top arrow (promote).
Follow the steps as shown in the below graphic:


It would be great if you could document this in the readme file for others. Thanks for the wonderful tools.
0 Kudos
PawanVuppala
Frequent Contributor
Hello Robert,
Thanks as always for the wonderful freebie widgets.  I am trying to use this widget and for some reason the basemaps are not grouped on my webapp like your sample.  attaching the screenshot and here's the config.xml which is a copy/paste from the sample.
<configuration>
    <title></title>
        <subtitle>GIS Portal</subtitle>
        <logo>assets/images/OCD_DRU_logo.png</logo>
        <style>
            <colors>0xFFFFFF,0x333333,0x101010,0x000000,0xFFD700</colors>
            <alpha>0.8</alpha>
        </style>
         <geometryservice url="http://myserver/ArcGIS/rest/services/Maps/Geometry/GeometryServer" />
        <bing key="mybingkey"/>

    <!-- UI elements -->
    <widget left="10"  top="50"    config="widgets/Navigation/NavigationWidget.xml" url="widgets/Navigation/NavigationWidget.swf"/>
    <widget right="-2" bottom="-2" config="widgets/OverviewMap/OverviewMapWidget.xml" url="widgets/OverviewMap/OverviewMapWidget.swf"/>
    <widget right="15" top="55"    config="widgets/eMapSwitcher/MapSwitcherWidget.xml" url="widgets/eMapSwitcher/MapSwitcherWidget.swf"/>
    <widget left="0"   top="0"     config="widgets/HeaderController/HeaderControllerWidget.xml" url="widgets/HeaderController/HeaderControllerWidget.swf"/>

    <map initialextent="-9559973 4601704 -9529513 4621654" top="40" zoomslidervisible="false">
        <basemaps>
            <layer label="Streets" type="tiled" visible="true"  alpha="1" autoswitchtoscale="4513.988705"
                        url="http://server.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer"/>
            <layer label="Aerial"  type="tiled" visible="false" alpha="1"
                        url="http://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer"/>
            <layer label="Aerial"  type="tiled" visible="false" alpha="1"
                        url="http://server.arcgisonline.com/ArcGIS/rest/services/Reference/World_Boundaries_and_Places/MapServer"/>
            <layer label="Topo"    type="tiled" visible="false" alpha="1"
                        url="http://server.arcgisonline.com/ArcGIS/rest/services/World_Topo_Map/MapServer"/>
            <layer label="Bing Streets" type="bing" visible="false" style="road" culture="en-US" />
            <layer label="Bing Aerial" type="bing" visible="false" style="aerial" culture="en-US" />
            <layer label="Bing Hybrid" type="bing" visible="false" style="aerialWithLabels" culture="en-US" />
     <layer label="Esri Nav. Charts" type="tiled" visible="false" forcescaleonswitch="577790.554289"
                   url="http://server.arcgisonline.com/ArcGIS/rest/services/World_Topo_Map/MapServer"/>
      <layer label="Esri Nav. Charts" type="tiled" visible="false" forcescaleonswitch="577790.554289"
                   url="http://server.arcgisonline.com/ArcGIS/rest/services/Specialty/World_Navigation_Charts/MapServer"/>
        </basemaps>
<operationallayers>
            <layer label="Parish Boundary" type="feature" url="http://myserver/ArcGIS/rest/services/Maps/RHP/MapServer/10" popupconfig="popups/PopUp_Parish.xml" alpha="0.5"/> 
            <layer label="Congressional Districts 2011" type="feature" url="http://myserver/ArcGIS/rest/services/Maps/RHP/MapServer/5" popupconfig="popups/PopUp_CD.xml" alpha="0.5"/>
            <layer label="SRPP" type="feature" url="http://myserver/ArcGIS/rest/services/Maps/RHP/MapServer/2" popupconfig="popups/PopUp_SRPP.xml"/>
     <layer label="HAP" visible="false" type="feature" url="http://myserver/ArcGIS/rest/services/Maps/RHP/MapServer/1" popupconfig="popups/PopUp_HAP.xml">
     </layer>
                
          </operationallayers>
    </map>

    <!-- widgets organized into widget containers that manage close/open etc -->
    <!-- supported layout property options: horizontal(default)|float|vertical|fix-->
    <widgetcontainer layout="float" />
</configuration>


Please Help!!!

Thanks!
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Pawan,

   I did not duplicate instructions for enabling the basemap gallery as this is a esri OTB function of the map switcher widget. As you are manually specifying the basemap layer instead of using the new addarcgisbasemaps="true" on the map element in the main config.xml, you will have to have a
icon="assets/images/basemap_streets.jpg"
added to each of your basemap layers.
0 Kudos
Corbinde_Bruin
Frequent Contributor
I noticed that if you hold the scroll and move off the widget window (to the left) the widget disappears, but you still have the control of fading the maps. Is that intentional?

Thanks for your awesome widgets!
-cdebruin
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Corbin,

   I tried several things to test if I could figure out what you are saying but I am just lost... What are you talking about when you say
hold the scroll and move off the widget window (to the left)
?
0 Kudos
RhettZufelt
MVP Notable Contributor
Robert,  I can reproduce this with version 3.0.

If I grab the slider and slide all the way to the left, and then some, the basemap dropdown dissapears, but, if you don't let go of the mouse button and move back and forth, it is still fading the basemaps.

Tested on your site as well.  See same behavior.

Not that it matters any as it still works great,

R_
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Ahh... Now I see. I will have that fixed in the next release.
0 Kudos
Corbinde_Bruin
Frequent Contributor
Robert,  I can reproduce this with version 3.0.

If I grab the slider and slide all the way to the left, and then some, the basemap dropdown dissapears, but, if you don't let go of the mouse button and move back and forth, it is still fading the basemaps.

Tested on your site as well.  See same behavior.

Not that it matters any as it still works great,

R_


You worded it far better than I did! Thank you, and I agree the widget is still fantastic.
0 Kudos
JayGeisen
Regular Contributor
Can someone explain to me how to configure the Map Switcher to expand only the first level of a service/layer in the Map Switcher widget by default? The way my mxd is set up, the layers list is expanded but the group layers underneath are not. This is the way I would like it to be by default when you hover over the "More" button. I realize I can set expandlayeritems to true, but I don't want the entire list of layers within the service to be expanded, only the first level.
0 Kudos