Weather Underground 1.2 widget

2562
7
01-06-2011 09:25 AM
MatthewLawton
Occasional Contributor
I'm trying to implement Robert's Weather Underground 1.2 widget in my SFV 1.3. I think I have it setup correctly, but when I run my project and attempt to use the widget, I get this security error:

SecurityError: Error #2142: Security sandbox violation: local SWF files cannot use the LoaderContext.securityDomain property. file:///C:/Inetpub/wwwroot/Emergency_src/bin-debug/index.swf was attempting to load http://resize.wunderground.com/cgi-bin/resize_convert?ox=gif&url=radblast/cgi-bin/radar/WUNIDS_composite%3Fcenterlat=39.49833298%26centerlon=-119.76805878%26radius=15%26newmaps=1%26smooth=1.


I read on the web where it says this could be caused by a missing "trustContent" property somewhere, whereas others say it has to do something with "SecurityDomain.currentDomain", which I can't seem to find in the code.

Any idea why this is happening? If I compile the project and access it from another workstation I get this application error:

Error: Event Target: [object GeometryService]

Event Type: fault

Fault Code: Channel.Security.Error

Fault Info: Security error accessing url
Tags (2)
0 Kudos
7 Replies
DasaPaddock
Esri Regular Contributor
Does it work if you run your Viewer from http:// instead of file://?
e.g. http://localhost/Emergency_src/bin-debug/index.swf

You can configure Flash Builder to launch it this way for you by setting the "Output folder URL" under the Project properties Flex Build Path.
0 Kudos
MatthewLawton
Occasional Contributor
I knew it had to be something simple like that. Works great now. Thank you, Dasa!
0 Kudos
AimeiChen
Occasional Contributor
Hi, Matthew
I am looking for the weather underground wiget for flex 1.3, would you mind share the source code with me? I appreciate!

AM
I'm trying to implement Robert's Weather Underground 1.2 widget in my SFV 1.3. I think I have it setup correctly, but when I run my project and attempt to use the widget, I get this security error:

SecurityError: Error #2142: Security sandbox violation: local SWF files cannot use the LoaderContext.securityDomain property. file:///C:/Inetpub/wwwroot/Emergency_src/bin-debug/index.swf was attempting to load http://resize.wunderground.com/cgi-bin/resize_convert?ox=gif&url=radblast/cgi-bin/radar/WUNIDS_composite%3Fcenterlat=39.49833298%26centerlon=-119.76805878%26radius=15%26newmaps=1%26smooth=1.


I read on the web where it says this could be caused by a missing "trustContent" property somewhere, whereas others say it has to do something with "SecurityDomain.currentDomain", which I can't seem to find in the code.

Any idea why this is happening? If I compile the project and access it from another workstation I get this application error:

Error: Event Target: [object GeometryService]

Event Type: fault

Fault Code: Channel.Security.Error

Fault Info: Security error accessing url
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Aimei,

   Here is the old 1.x version:

http://arcscripts.esri.com/details.asp?dbid=16749
0 Kudos
AimeiChen
Occasional Contributor
Hi, Robert

The widget looks great! I have couple questions for you. when the widget opens up, it default shows weather in AL, how can I change that to our local weather? Also, after I did search and tried to zoom to the local airport, my map is blank, would you please help figure it out?

I appreciate your help!

Aimei
Aimei,

   Here is the old 1.x version:

http://arcscripts.esri.com/details.asp?dbid=16749
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Aimei,

  You will find all the answers in the WUnderGroundWidget.xml file.

<!-- enter either the zip code, airport code, or city and state to
    enter in the search textbox when widget is opened. -->
    <defaultsearch>bhm</defaultsearch>


The outspatialref in the WUnderGroundWidget.xml will need to be set to the WKID of your map.
0 Kudos
AimeiChen
Occasional Contributor
Robert,
Got it work perfectly, thanks for your quick reply.

Have a nice weekend.

Aimei
Aimei,

  You will find all the answers in the WUnderGroundWidget.xml file.



The outspatialref in the WUnderGroundWidget.xml will need to be set to the WKID of your map.
0 Kudos