Select to view content in your preferred language

WUnderground Widget

3817
16
Jump to solution
02-07-2012 01:32 PM
JeffreyUtter
Deactivated User
Robert,
I really like this widget. When querying a location, it provides 3 locations close together.
Is there a way to show 8 locations closest to the query?
Thanks.
Jeff
Tags (2)
0 Kudos
1 Solution

Accepted Solutions
JeffreyUtter
Deactivated User
Ah, so simple....you the man!
Many thanks Robert.

View solution in original post

0 Kudos
16 Replies
RobertScheitlin__GISP
MVP Emeritus
Jeff,

    No, there really is not. What happens is the weatherunderground uses the zip, city, airport code, etc to do a geo lookup and provides the closest airport weather stations, but it does not allow for you to specify any tolerance or a specific number of desired returns.

Don't forget to click the Mark as answer check and to click the top arrow (promote) as shown below:
0 Kudos
JeffreyUtter
Deactivated User
OK, I understand. For those working with huge geographic areas, more than 3 weather stations would really help.
0 Kudos
DanPfeffer
Emerging Contributor
Agreed. I have a client that wants a display for the nation or cities of interest. Great widget!
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Sorry guys I don't control what WeatherUnderground allows.
0 Kudos
philippschnetzer
Frequent Contributor
I also had to show several locations.  I just created duplicates of the configurable xml file and loaded the widget in the main config.xml once for each xml I needed. 

Also, I preload all of this when the map loads and hide the widget from view - this way just the icon appears on the map and the user does not have to interact with a widget at all.  I am loading 7 xml files in the main config.xml and find that it takes about 5 seconds for all the results to display on the map.  To do this on a national scale - I wouldn't recommend it the way I am doing it but it may be possible to hardcode something in the main code rather than have to go through hundreds of xml files...

Robert - sorry if it seems like I hacked your widget all to pieces.  It really is a great tool - but in my area I was not getting any info for the 7 day forecast or for the radar - so I just decided it would be easier for the user to just not have to deal with it at all.
0 Kudos
JeffreyUtter
Deactivated User
I like that idea of creating multiple xml's in the config file, but I errored out.
Can you give me a sample code on how you did it?
0 Kudos
philippschnetzer
Frequent Contributor
First, make some copies of the 'WUndergroundWidget.xml' and add an inceremental number to the end.  Then in the main config.xml do something like this:

<widget left="20" top="20" preload="open" config="widgets/WeatherUnderground/WUndergroundWidget.xml" url="widgets/WeatherUnderground/WUndergroundWidget.swf"/> 
    <widget left="20" top="20" preload="open" config="widgets/WeatherUnderground/WUndergroundWidget1.xml" url="widgets/WeatherUnderground/WUndergroundWidget.swf"/> 
    <widget left="20" top="20" preload="open" config="widgets/WeatherUnderground/WUndergroundWidget2.xml" url="widgets/WeatherUnderground/WUndergroundWidget.swf"/> 
    <widget left="20" top="20" preload="open" config="widgets/WeatherUnderground/WUndergroundWidget3.xml" url="widgets/WeatherUnderground/WUndergroundWidget.swf"/> 


Keep in mind this is only really going to work if you actually hide the entire widget as well...otherwise you will have four copies of the widget floating around on your map.
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Jeff,

   I would hang tight as I am going to look at this today and see if I can improve the widget to fit querying multiple locations.
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Guys,

   You need to look at the latest version 2.5.1.

Version 2.5.1 - Feb 26, 2012
* Added multi search capabilities. Just add your searches to the text box with a + sign
  stringing them together (i.e. KBHM+KATL+KANB or Anniston, AL+Oxford, AL).
* Weather Radar Images and Forecasts now have drop downs for when multi searches are done.
* Auto close time for popups disabled when hovering over the popup.
* Regression made to move away from esri popups and back to infopopups as there is still a
  serious error when using popups that cause widget resizing and moving to behave erratically.
* Because of the regression mentioned above you need to be sure to replace your old
  UndergroundWidget.xml with this new one.
* Added zoom to all results and clear links to results page along with display of number
  of observations returned.
* If a search fails for one of your multi searches a message informs you with one failed to
  return results.
* If you are using the uncompiled version then this version requires that you add the
  WeatherInfoPopupWidget.mxml to the modules list as well.

Hope you like the new version.
0 Kudos