Solved! Go to Solution.
<?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>