Header/widget display issue when upgrading to 3.1

1308
20
01-25-2013 06:43 AM
BenAller
New Contributor III
I'm trying to get a basic 3.1 viewer to work correctly, but the header, widgets and map switcher dissapear or are obscured when I first view in a browser with a cleared cache. Once I refresh the browser, everything displays correctly. I believe it's occurring when I add operational layers with popups, and possibly popups associated with dynamic layers.  I'm using my own basemaps and operational layers in state plane, and I set the wraparound180 to false and addarcgisbasemaps to false (as noted in other posts).

Any help would be greatly appreciated.


Thanks,
Ben
Tags (2)
0 Kudos
20 Replies
GISDev1
Occasional Contributor III
Hello Ben,

It would be much quicker to troubleshoot if you post your config.xml or a URL to your Flex Viewer.
0 Kudos
BenAller
New Contributor III
The flexviewer is internal, so here's the config.  I should mention that we have a working version in 3.0, and nothing has changed regarding our data/services. 

<?xml version="1.0" ?>
<!--
////////////////////////////////////////////////////////////////////////////////
//
// Read more about ArcGIS Viewer for Flex - http://links.esri.com/flexviewer
//
////////////////////////////////////////////////////////////////////////////////
-->
<configuration>
    <title>ArcGIS Viewer for Flex</title>
    <subtitle>a configurable web mapping application</subtitle>
    <logo>assets/images/logo.png</logo>
    <style>
        <colors>0xFFFFFF,0x333333,0x101010,0x000000,0xFFD700</colors>
        <alpha>0.8</alpha>
    </style>
    <!-- replace the following url with your own geometryservice -->
    <geometryservice url="http://tasks.arcgisonline.com/ArcGIS/rest/services/Geometry/GeometryServer" />

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

    <!--<map wraparound180="true" initialextent="-14083000 3139000 -10879000 5458000" fullextent="-20000000 -20000000 20000000 20000000" top="40" addarcgisbasemaps="true">-->
      <map wraparound180="false" top="40" addarcgisbasemaps="false">
        <basemaps>
          <layer type="tiled" label="BaseMap Hillshade Aerials 2010 C StPl FileGeo" url="http://dtarcgis10/ArcGIS/rest/services/MapServices/BaseMap_HillshadeAerial2010_C_StPl_FileGeo/MapSer..." visible="true"/>
        </basemaps>
        <operationallayers>
          <layer type="dynamic" label="BaseMap Admin Boundaries" url="http://dtarcgis10/ArcGIS/rest/services/Health/Health_AdminBoundaries_D_StPl_FileGeo/MapServer" visible="true"/>
          <layer type="tiled" label="Flood Areas" url="http://dtarcgis10/ArcGIS/rest/services/MapServices/BaseMap_FEMA_Flood_Risk_C_StPl_FileGeo/MapServer" visible="true" alpha="0.5"/>
          <layer type="tiled" label="BaseMap Features" url="http://dtarcgis10/ArcGIS/rest/services/MapServices/BaseMap_RoadsRiversRailStreams_C_StPl_FileGeo/Map..." visible="true" alpha="0.8">
            <sublayer id="1" popupconfig="popups/PopUp_Roads.xml"/>
          </layer>
          <layer type="tiled" label="10ft Contours" url="http://dtarcgis10/ArcGIS/rest/services/MapServices/BaseMap_Contours_10ft_2008_C_StPl_FileGeo/MapServ..." visible="false"/>
          <layer type="tiled" label="2ft Contours" url="http://dtarcgis10/ArcGIS/rest/services/MapServices/BaseMap_Contours_2ft_2008_C_StPl_FileGeo/MapServe..." visible="false"/>
          <layer type="dynamic" label="Soils" url="http://dtarcgis10/ArcGIS/rest/services/Health/Health_Soils_D_StPl_FileGeo/MapServer" visible="false" alpha="0.5">
            <sublayer id="0" popupconfig="popups/PopUp_Soils.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">
        <widget label="Bookmarks"         left="430" top="90"
                icon="assets/images/i_bookmark.png"
                config="widgets/Bookmark/BookmarkWidget.xml"
                url="widgets/Bookmark/BookmarkWidget.swf"/>
        <widget label="Louisville Police" left="590" top="280"
                icon="assets/images/i_police.png"
                config="widgets/Query/QueryWidget_Louisville_PoliceStations.xml"
                url="widgets/Query/QueryWidget.swf"/>
        <widget label="Search" left="80" top="280"
                icon="assets/images/i_search.png"
                config="widgets/Search/SearchWidget_Louisville.xml"
                url="widgets/Search/SearchWidget.swf"/>
        <widget label="Earthquakes (GeoRSS)" left="410" top="280"
                icon="assets/images/i_rss.png"
                config="widgets/GeoRSS/GeoRSSWidget.xml"
                url="widgets/GeoRSS/GeoRSSWidget.swf"/>
        <widget label="Draw" left="60" top="400"
                icon="assets/images/i_draw2.png"
                config="widgets/Draw/DrawWidget.xml"
                url="widgets/Draw/DrawWidget.swf"/>
        <widget label="Print" left="390" top="400"
                icon="assets/images/i_print.png"
                config="widgets/Print/PrintWidget.xml"
                url="widgets/Print/PrintWidget.swf"/>

        <!--
        <widget label="My first widget"
                icon="assets/images/i_widget.png"
                config="widgets/Samples/HelloWorld/HelloWorldWidget.xml"
                url="widgets/Samples/HelloWorld/HelloWorldWidget.swf"/>
        -->
    </widgetcontainer>
   
</configuration>
0 Kudos
GISDev1
Occasional Contributor III
Have you tried supplying an initial extent parameter in your basemap WKID in your new map tag?
0 Kudos
BenAller
New Contributor III
Based on the documentation, the viewer should interpret the basemap to get the initial extent, if no extent is provided.  I gave it a try though, and the results were the same.  I included a screenshot of what it looks like.

Ben
0 Kudos
GISDev1
Occasional Contributor III
Have you tried in IE or Chrome? Have you tried without any extra popups and keep your operational layers commented out?
Have you tried the esri base maps and comment yours out?
0 Kudos
BenAller
New Contributor III
I tried in both IE and Firefox, and the problem occurs in both.  The viewer displays fine when I comment out the popups and operational layers.   It also works fine when comment out the popups and I leave in the operational layers.  It really seems to be the popups, but the popups have not changed since our 3.0 viewer, and they work fine once the browser is refreshed.   The viewer also works fine when I use ESRI basemaps and comment out my layers.   

Ben
0 Kudos
GISDev1
Occasional Contributor III
So you've narrowed it down to the pop-ups then.
How about double checking your .xml pop-ups for format issues, like if someone edited the .xml in Microsoft Word it can corrupt it sometimes.

Try re-creating the popup .xml's that are causing the issue.
0 Kudos
MichaelVolz
Esteemed Contributor
To GISDev:

I was wondering if you have a basic viewer application setup that uses your own mapservices with pop-ups and all the widgets appear as expected at start-up, without requiring a refresh of the browser?

The reason I ask is because in the following post "Issues upgrading Flexviewer 3.1 (uncompiled)" from 12/18/2012 other users were commenting about the same issue and the ESRI person was unable to confirm whether this was a bug or not.

I am having the same issues as the original poster of this thread.
0 Kudos
BenAller
New Contributor III
Looks like the CDATA section of my popups might be the culprit.  When I remove it, the viewer seems to display without the need to refresh.  Not sure why this has changed between 3.0 and 3.1, but at least we're moving in the right direction.
0 Kudos