Select to view content in your preferred language

Weather Underground Widget for FlexViewer 2.1

3613
17
09-23-2010 08:12 PM
RobertScheitlin__GISP
MVP Emeritus
All,

I have been waiting for the Final release of the FlexViewer 2.1 before I started to push out some widgets I have been working on.

Here is my Weather Underground widget

http://www.arcgis.com/home/item.html?id=f6bf35d7e7dc4db697f9718fd1b2b53f#

More FlexViewer 2.1 widgets to come stay tuned...
Tags (2)
0 Kudos
17 Replies
ChristinaMcCullough
Regular Contributor
here is the text in my xml file. 

<configuration>
<apquery>http://api.wunderground.com/auto/wui/geo/WXCurrentObXML/index.xml?query=[value]</apquery>
<obquery>http://api.wunderground.com/auto/wui/geo/GeoLookupXML/index.xml?query=[value]</obquery>
<pwsquery>http://api.wunderground.com/weatherstation/WXCurrentObXML.asp?ID=[value]</pwsquery>
<forcastquery>http://api.wunderground.com/auto/wui/geo/ForecastXML/index.xml?query=[value]</forcastquery>
<zoomscale>10000</zoomscale>
<outspatialref>102100</outspatialref>
<geometryservice>http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/Geometry/GeometryServer</geometryservice>
<!-- valid values are f for Fahrenheit and c for Celsius -->
<tempdefault>f</tempdefault>
<!-- enter either the zip code, airport code, or city and state to
enter in the search textbox when widget is opened. -->
<defaultsearch>Indianapolis, Indiana</defaultsearch>
<!-- if a defaultsearch value is entered do you want to automatically search for it? -->
<autosearchdefault>true</autosearchdefault>
<!-- if you do not want to allow the user to change the search then set to false. -->
<showsearchoption>true</showsearchoption>
<!-- if you to show personal weather station observations by default. -->
<showpwsdefault>false</showpwsdefault>
<!-- if you to show current temp at the observations along with the weather
condition icon by default. -->
<showtempsdefault>true</showtempsdefault>
<labels>
  <loadinglabel1>Retrieving List Of Weather Stations...</loadinglabel1>
  <loadinglabel2>Retrieving Airport Weather Observations...</loadinglabel2>
  <loadinglabel3>Retrieving Personal Weather Observations...</loadinglabel3>
</labels>
<info>widgets/InfoTemplates/InfoPopupWidget.swf</info>
</configuration>
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Christina,

        The real issue is that the XML file is not available from your server. when you go to the url that you provided it should bring up the xml file and it does not so you have an issue there.
0 Kudos
ChristinaMcCullough
Regular Contributor
Robert,

Sorry I am really confused as to how to fix this. The widget was working prior to yesterday.  

I increased the permission settings for the .xml file on the server.  I still could not see the xml file.  So, I uninstalled and reinstalled it on the site.  Now I am getting this error:

SecurityError: Error #2142: Security sandbox violation: local SWF files cannot use the LoaderContext.securityDomain property. file:///C:/cmccullough.net/McCulloughConsulting/IGIC/IGICFlash/Working/bin-debug/index.swf/[[DYNAMIC]]/2 was attempting to load http://icons-pe.wxug.com/i/c/a/partlycloudy.gif.
at flash.display::Loader/_load()
at flash.display::Loader/load()
at mx.controls::SWFLoader/loadContent()
at mx.controls::SWFLoader/load()
at mx.controls::SWFLoader/commitProperties()
at mx.core::UIComponent/validateProperties()
at mx.managers::LayoutManager/validateClient()
at mx.core::UIComponent/validateNow()
at spark.components::DataGroup/initializeTypicalItem()
at spark.components::DataGroup/ensureTypicalLayoutElement()
at spark.components::DataGroup/measure()
at mx.core::UIComponent/measureSizes()
at mx.core::UIComponent/validateSize()
at mx.managers::LayoutManager/validateSize()
at mx.managers::LayoutManager/doPhasedInstantiation()
at mx.managers::LayoutManager/doPhasedInstantiationCallback()


SecurityError: Error #2142: Security sandbox violation: local SWF files cannot use the LoaderContext.securityDomain property. file:///C:/cmccullough.net/McCulloughConsulting/IGIC/IGICFlash/Working/bin-debug/index.swf/[[DYNAMIC]]/2 was attempting to load http://resize.wunderground.com/cgi-bin/resize_convert?ox=gif&url=radblast/cgi-bin/radar/WUNIDS_compo....
at flash.display::Loader/_load()
at flash.display::Loader/load()
at mx.controls::SWFLoader/loadContent()
at mx.controls::SWFLoader/load()
at mx.controls::SWFLoader/commitProperties()
at mx.core::UIComponent/validateProperties()
at mx.managers::LayoutManager/validateProperties()
at mx.managers::LayoutManager/doPhasedInstantiation()
at mx.managers::LayoutManager/validateNow()
at mx.core::UIComponent/commitCurrentState()
at mx.core::UIComponent/setCurrentState()
at mx.core::UIComponent/set currentState()
at widgets.WeatherUnderground::WUndergroundWidget/showStateTextSearch()
at com.esri.viewer.components::TitlebarButton/icon_clickHandler()
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Christina,

   You will always get this error when running the WeatherUnderground widget from the C: Drive as it is exactly what the error says "A Security Violation". When you publish the app to IIS and run it from there you will not get that specific error any more.   So I take it that you are seeing the WUndergroundWidget.xml in the virtual directory on your web server than?...
0 Kudos
ChristinaMcCullough
Regular Contributor
Strange, but I am now getting the previous error???  The xml file is on the server with extended permissions.  I am officially stumped.  Would Flash compile this incorrectly??

[IOErrorEvent type="ioError" bubbles=false cancelable=false eventPhase=2 text="Error #2032"]

Fault code: Server.Error.Request

Fault info: HTTP request error

Fault details: Error: [IOErrorEvent type="ioError" bubbles=false cancelable=false eventPhase=2 text="Error #2032"]. URL: http://mccullough-consulting.net/Working/widgets/WeatherUnderground/WUndergroundWidget.xml
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Christina,

   Just to be sure Flex is case sensitive is the file named EXACTLY : http://mccullough-consulting.net/Working/widgets/WeatherUnderground/WUndergroundWidget.xml?
0 Kudos
ChristinaMcCullough
Regular Contributor
I just noticed the g was not correct in the config.xml file.  It is now fixed.   Thanks!!
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
All,

   A new and improved version is now available.
0 Kudos