Hi All,I've been upgrading our in-house web mapping application from flexviewer 3.0 to 3.1, and I've encountered a small problem.The first time I load the Flexviewer application in the web browser, the User Interface doesn't load properly. If I refresh using the F5 button, it loads properly.Here is a screenshot of the issue:First load:[ATTACH=CONFIG]20039[/ATTACH]After refresh (F5)[ATTACH=CONFIG]20040[/ATTACH]Any help on the matter would be appreciated.Cheers,Brett
<?xml version="1.0" ?> <!-- //////////////////////////////////////////////////////////////////////////////// // // Read more about ArcGIS Viewer for Flex - http://links.esri.com/flexviewer // //////////////////////////////////////////////////////////////////////////////// --> <configuration> <title>Environmental Consultants</title> <subtitle>Web Mapping Application - General Reference</subtitle> <logo>assets/images/TERA_White.png</logo> <style> <colors>0xFFFFFF,0x1B382B,0x101010,0x000000,0xF0F0F0</colors> <alpha>0.8</alpha> </style> <!-- replace the following url with your own geometryservice --> <geometryservice url="###censored###" /> <!-- TERA's BING MAPS KEY BELOW --> <bing key="###censored###"/> <!-- <splashpage label="TERA Environmental Consultants" config="widgets/mySplash/SplashWidget.xml" url="widgets/mySplash/SplashWidget.swf"/>--> <!-- 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"/> <widget right="100" bottom="7" config="widgets/StaticImage/StaticImageWidget.xml" url="widgets/StaticImage/StaticImageWidget.swf"/> <map wraparound180="true" initialextent="-16141587 5585597 -8642197 10056857" fullextent="-16141587 5585597 -8642197 10056857" top="40" addarcgisbasemaps="false"> <!-- Valid Scale Levels --> <lods> <!-- <lod resolution="156543.033928" scale="591657527.591555"/> --> <!-- Level 0 --> <!-- <lod resolution="78271.5169639999" scale="295828763.795777"/>--> <!-- Level 1 --> <!-- <lod resolution="39135.7584820001" scale="147914381.897889"/>--> <!-- Level 2 --> <lod resolution="19567.8792409999" scale="73957190.948944"/> <!-- Level 3 --> <lod resolution="9783.93962049996" scale="36978595.474472"/> <!-- Level 4 --> <lod resolution="4891.96981024998" scale="18489297.737236"/> <!-- Level 5 --> <lod resolution="2445.98490512499" scale="9244648.868618"/> <!-- Level 6 --> <lod resolution="1222.99245256249" scale="4622324.434309"/> <!-- Level 7 --> <lod resolution="611.49622628138" scale="2311162.217155"/> <!-- Level 8 --> <lod resolution="305.748113140558" scale="1155581.108577"/> <!-- Level 9 --> <lod resolution="152.874056570411" scale="577790.554289"/> <!-- Level 10 --> <lod resolution="76.4370282850732" scale="288895.277144"/> <!-- Level 11 --> <lod resolution="38.2185141425366" scale="144447.638572"/> <!-- Level 12 --> <lod resolution="19.1092570712683" scale="72223.819286"/> <!-- Level 13 --> <lod resolution="9.55462853563415" scale="36111.909643"/> <!-- Level 14 --> <lod resolution="4.77731426794937" scale="18055.954822"/> <!-- Level 15 --> <lod resolution="2.38865713397468" scale="9027.977411"/> <!-- Level 16 --> <lod resolution="1.19432856685505" scale="4513.988705"/> <!-- Level 17 --> <!-- <lod resolution="0.597164283559817" scale="2256.994353"/> --> <!-- Level 18 --> <!-- <lod resolution="0.298582141647617" scale="1128.497176"/> --> <!-- Level 19 --> </lods> <basemaps> <layer label="SPOT5+Base" type="tiled" visible="false" alpha="1" icon="###censored###" url="###censored###"/> <layer label="SPOT5 2011" type="tiled" visible="false" alpha="1" icon="###censored###" url="###censored###"/> <layer label="Terrain" type="tiled" visible="true" alpha="1" icon="###censored###" url="###censored###"/> <layer label="eTopo" type="tiled" visible="false" alpha="1" icon="###censored###" url="###censored###"/> <layer label="Bing Aerial (Internal Use)" type="bing" style="aerialWithLabels" icon="###censored###"/> </basemaps> <operationallayers> <layer label="Green and White Area" type="dynamic" visible="false" alpha="0.6" imageformat="png32" url="###censored###"> <sublayer id="0" popupconfig="popups/PopUp_GrnWht.xml"/> </layer> <layer label="Natural Regions and Subregions" type="dynamic" visible="false" alpha="0.4" imageformat="png32" url="###censored###"> <sublayer id="3" popupconfig="popups/PopUp_NatSubRegion.xml"/> </layer> <layer label="Historical Resource Values" type="dynamic" visible="false" alpha="0.6" imageformat="png32" url="###censored###"> <sublayer id="0" popupconfig="popups/PopUp_HRV.xml"/> </layer> <layer label="Alberta Dispositions" type="dynamic" visible="false" alpha="0.8" imageformat="png32" url="###censored###"> <sublayer id="0" popupconfig="popups/PopUp_AB_Disp.xml"/> </layer> <layer label="Grids" type="tiled" visible="false" url="###censored###"/> </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" icon="assets/images/i_bookmark.png" config="widgets/Bookmark/BookmarkWidget.xml" url="widgets/Bookmark/BookmarkWidget.swf"/> <widget label="Legal Location Search" left="60" top="400" icon="assets/images/i_search.png" config="widgets/Search/SearchWidget.xml" url="widgets/Search/SearchWidget.swf"/> <widget label="Measure and Draw" left="60" top="400" icon="assets/images/i_measure.png" config="widgets/Draw/DrawWidget.xml" url="widgets/Draw/DrawWidget.swf"/> <widget label="Legend" preload="closed" config="widgets/Legend/LegendWidget.xml" icon="assets/images/Legend32.png" url="widgets/Legend/LegendWidget.swf"/> </widgetcontainer> </configuration>
<map wraparound180="true" .....
<?xml version="1.0" ?> <!-- //////////////////////////////////////////////////////////////////////////////// // // Read more about ArcGIS Viewer for Flex - http://links.esri.com/flexviewer // //////////////////////////////////////////////////////////////////////////////// --> <configuration> <title>Environmental Consultants</title> <subtitle>Web Mapping Application - General Reference</subtitle> <logo>assets/images/TERA_White.png</logo> <style> <colors>0xFFFFFF,0x1B382B,0x101010,0x000000,0xF0F0F0</colors> <alpha>0.8</alpha> </style> <!-- replace the following url with your own geometryservice --> <geometryservice url="###censored###" /> <!-- TERA's BING MAPS KEY BELOW --> <bing key="###censored###"/> <!-- <splashpage label="TERA Environmental Consultants" config="widgets/mySplash/SplashWidget.xml" url="widgets/mySplash/SplashWidget.swf"/>--> <!-- 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 right="100" bottom="7" config="widgets/StaticImage/StaticImageWidget.xml" url="widgets/StaticImage/StaticImageWidget.swf"/> <widget left="0" top="0" config="widgets/HeaderController/HeaderControllerWidget.xml" url="widgets/HeaderController/HeaderControllerWidget.swf"/> <map wraparound180="true" initialextent="-16141587 5585597 -8642197 10056857" fullextent="-16141587 5585597 -8642197 10056857" top="40" addarcgisbasemaps="false">
TypeError: Error #1009: Cannot access a property or method of a null object reference. at com.esri.viewer.components.toc.tocClasses::TocMapLayerItem/createChildren() at com.esri.viewer.components.toc.tocClasses::TocMapLayerItem() at com.esri.viewer.components.toc::TOC/registerMapLayer() at MethodInfo-386() at com.esri.viewer.components.toc.utils::MapUtil$/forEachMapLayer() at com.esri.viewer.components.toc::TOC/registerAllMapLayers() at com.esri.viewer.components.toc::TOC/commitProperties() at mx.core::UIComponent/validateProperties() at mx.managers::LayoutManager/validateProperties() at mx.managers::LayoutManager/doPhasedInstantiation() at mx.managers::LayoutManager/doPhasedInstantiationCallback()
I just tried loading the application in Internet Explorer, and I got this error message: TypeError: Error #1009: Cannot access a property or method of a null object reference. at com.esri.viewer.components.toc.tocClasses::TocMapLayerItem/createChildren() at com.esri.viewer.components.toc.tocClasses::TocMapLayerItem() at com.esri.viewer.components.toc::TOC/registerMapLayer() at MethodInfo-386() at com.esri.viewer.components.toc.utils::MapUtil$/forEachMapLayer() at com.esri.viewer.components.toc::TOC/registerAllMapLayers() at com.esri.viewer.components.toc::TOC/commitProperties() at mx.core::UIComponent/validateProperties() at mx.managers::LayoutManager/validateProperties() at mx.managers::LayoutManager/doPhasedInstantiation() at mx.managers::LayoutManager/doPhasedInstantiationCallback() Perhaps this is a bug that is causing the UI to not display properly.
I tried commenting out different part of the config-file as Rhett suggested, and in my case I could narrow it down to be a problem with the PopUps. If I'm commenting out all sublayers them problems seems to disappear. But I haven't been able to figure out what the problem with the popups is.In this case I'm using PopUp xml-files that where created using AppBuilder 3.0, I saw that AppBuilder 3.1 also adds <showattachments>false</showattachments><showrelatedrecords>false</showrelatedrecords>to the PopUp.xml files and tried addig thoose lines to my PopUp.xml files and thought it worked at first but after some more testing the problem occured again so I don't think that's the problem.... And it's not just one corrupt PopUp xml file, they all seems to cause the problem...
If you disable the popups, does it display correctly the first time around?
Did any of the data within the map change between 3 and 3.1? Meaning, did the indexes of the layers referenced for the popups get altered at all?
<?xml version="1.0" ?> <configuration> <title>Alberta Natural Regions and Subregions</title> <fields> <field name="NRNAME" alias= "Natural Region: " visible="true"/> <field name="NSRNAME" alias= "Natural Subregion: " visible="true"/> </fields> </configuration>
Angemeldete Mitglieder können Beiträge verfassen, Updates folgen und mehr. Neu hier? Registriere ein kostenloses Konto.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.