Select to view content in your preferred language

Map switcher widget not displaying

631
7
Jump to solution
01-11-2013 11:18 AM
LinkElmore
New Contributor III
I've been working on a Flex Viewer all day with no troubles with the map switcher widget but clearly I've done something to make it disappear and can't figure out what.

I'm using the Application Builder as well as manually editing the config.xml to get it like I want it.  The check mark in the AB for "Add Portal for ArcGIS Basemaps" is checked.  I have included both basemaps and operational layers but the widget does not display either the "Basemaps" button or the "More" button.

Here is the relevant section from config.xml:
<widget url="widgets/MapSwitcher/MapSwitcherWidget.swf" config="widgets/MapSwitcher/MapSwitcherWidget.xml" label="Map Switcher" icon="assets/images/i_globe.png" right="20" top="55"/>     <map attributionvisible="true" esrilogovisible="true" openhandcursorvisible="false" scalebarvisible="true" scalebar="default" zoomslidervisible="false" wraparound180="true" addarcgisbasemaps="true" initialextent="-9355402.291706543 4294366.250578298 -8319527.6843861155 4881402.627808294" wkid="102100" top="40" portalurl="https://www.arcgis.com">         <basemaps>             <layer type="dynamic" label="Virginia Counties" icon="assets/images/virginia_counties.jpg" imageformat="png8" url="http://websde/arcgis/rest/services/FlexServices/VGIN_BaseMapCounty/MapServer" visible="true"/>         </basemaps>         <operationallayers>             <layer type="dynamic" label="Karst Features" imageformat="png8" url="http://websde/arcgis/rest/services/Geology_Resources/VAKarstFeatures/MapServer" visible="false">                 <sublayer id="0" popupconfig="popups/PopUp_1.xml"/>             </layer>             <layer type="dynamic" label="Water Wells" imageformat="png8" url="http://websde/arcgis/rest/services/Geology_Resources/VirginiaWaterWells_WMS/MapServer" visible="false">                 <sublayer id="2" popupconfig="popups/PopUp_2.xml"/>             </layer>             <layer type="dynamic" label="Geology" alpha="0.5" imageformat="png8" url="http://websde/arcgis/rest/services/Geology_Resources/Geology_WMS/MapServer" visible="true"/>         </operationallayers>     </map>
Tags (2)
0 Kudos
1 Solution

Accepted Solutions
RobertScheitlin__GISP
MVP Emeritus
Link,

   Looking at your config.xml I can see several things that need addressing.

  1. The wraparound180 is still true and should be false.

  2. In a web application the web does not know where http://websde/arcgis/rest/services/FlexServices/VGIN_BaseMapCounty/MapServer is on the web... You need a full external URL for the websde server (i.e. maps.dmme.virginia.gov/websde or something like that).

View solution in original post

0 Kudos
7 Replies
RobertScheitlin__GISP
MVP Emeritus
Link,

   Is all your basemaps and operational layers in WKID 102100? If not then you need to remove the wkid="102100" from the Map tag and you should set the wraparound180="false" to avoid a potential bug in the 3.1 API.
0 Kudos
LinkElmore
New Contributor III
No, some of the layers are not Web Mercator.  It's been working all day and just blew up in the last hour.

I removed the wkid tag and set wraparound180=false and now nothing loads.

Live location here if you want to take a look.
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Link,

   Looking at your config.xml I can see several things that need addressing.

  1. The wraparound180 is still true and should be false.

  2. In a web application the web does not know where http://websde/arcgis/rest/services/FlexServices/VGIN_BaseMapCounty/MapServer is on the web... You need a full external URL for the websde server (i.e. maps.dmme.virginia.gov/websde or something like that).

0 Kudos
LinkElmore
New Contributor III
Robert,
That looks much better with the changes.  Thanks for your assistance.
0 Kudos
ChadHall
New Contributor
Robert, your answer just got my viewer working also so thank you for your knowledge.  Do you know of a reason why Firefox would show the basemap switcher properly and IE only shows the basemaps I specifically call out in the config.xml file?
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Chad,

   There is a bug in the 3.1 API that is likely the culprit of this issue.
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Chad,

    The likely culprit is a bug in the 3.1  Flex API.
0 Kudos