Author Topic: New Script to Display US NWS Graphical Forecast Maps  (Read 6499 times)

0 Members and 1 Guest are viewing this topic.

Offline gwwilk

  • Southeast Lincoln Weather
  • Forecaster
  • *****
  • Posts: 2578
    • SouthEast Lincoln, NE Weather
New Script to Display US NWS Graphical Forecast Maps
« on: January 05, 2013, 01:32:44 PM »
This package uses maps from graphical.weather.gov's site to display 13 different slideshows.  It has been preconfigured so that all that is necessary to install it into a SaratogaWx template website is to copy the WxUSFCSShow directory with contents to your site, and then move wxusfcsshow.php and if desired wxusfcsshow_all.php to your site's root directory.  A listing in the flyout-menu.xml menu system might also be a good idea if you want it available to others. :-)

The package's output may be seen here and in long form here.  I think the     long form 'all' display is very unwieldy, and this led to the clickable one-at-a-time slideshow script.

The included WxUSFCSShow.txt contains more information.
« Last Edit: January 06, 2013, 02:32:28 PM by gwwilk »
Regards, Jerry Wilkins
gwwilk@gmail.com

Offline MackerelSky

  • Contributor
  • ***
  • Posts: 113
    • McKean County Weather, Smethport Pa.
Re: New Script to Display US NWS Graphical Forecast Maps
« Reply #1 on: January 06, 2013, 07:51:32 AM »
He Jerry,

Hope things are well.

I had to make a couple of changes to two files to get your very nice script to work for me and I thought I'd pass them along incase someone else has the same issues. I did as you suggested and uploaded the entire directory to my website and then put the wxusfcsshow.php into my root. The page came up alright, but no maps.

At the top of the wxusfcsshow.php inside the head tags of the page, you have these two lines

Code: [Select]
<script src="./jquery/swissarmy.js" type="text/javascript"></script>
<script src="./jquery/wxusfcsshow.js" type="text/javascript"></script>

but no 'jquery' in the directory, so I changed it to this and it worked

Code: [Select]
<script src="./WxUSFCSShow/scripts/swissarmy.js" type="text/javascript"></script>
<script src="./WxUSFCSShow/scripts/wxusfcsshow.js" type="text/javascript"></script>

Then, at the top of the wxusfcsshow.js I had to make a small change to get my images to show up

Code: [Select]
var previmg='../WxUSFCSShow/images/previous.gif';
var stopimg='../WxUSFCSShow/images/pause.gif';
var playimg='../WxUSFCSShow/images/play.gif';
var nextimg='../WxUSFCSShow/images/next.gif';

removing a '.' from each path

Code: [Select]
var previmg='./WxUSFCSShow/images/previous.gif';
var stopimg='./WxUSFCSShow/images/pause.gif';
var playimg='./WxUSFCSShow/images/play.gif';
var nextimg='./WxUSFCSShow/images/next.gif';

But I still have a small issue and I wonder if you could shed some light. When I load the page for about 10 seconds I get a 'phantom' 7day precipitation map below the temperature map and then it goes away. Would there be something else I need to do?

Thanks for your time and no rush on my part
Brad
« Last Edit: January 06, 2013, 10:09:42 AM by MackerelSky »
Mckean County Weather
Located on upper Marvin Creek
https://mckeanweather.com/
Davis VP2 + fars
Cumulus 1.9.4-b1092

 

Offline gwwilk

  • Southeast Lincoln Weather
  • Forecaster
  • *****
  • Posts: 2578
    • SouthEast Lincoln, NE Weather
Re: New Script to Display US NWS Graphical Forecast Maps
« Reply #2 on: January 06, 2013, 08:35:54 AM »
Thanks for the kind words, Brad.  I was aware of the './jquery/' path problem almost immediately after I uploaded the package, and I thought I had corrected the problem.  It seems that I'm too new at this to have developed a versioning system that will keep me on the straight and narrow because I deleted the corrected package and not the uncorrected one!

The '../WxUSFCSShow/' problem in wxusfcsshow.js (and other kindred javascripts in the new package--more on that in a moment) apparently varies from server to server.  This path is what works on my GoDaddy Apache server as well as with my Dreamweaver 'Live' and my WAMP Apache 'localhost' server.  Someone more knowledgeable than I might offer a solution, but I don't have one at the moment.

The additional scripts in the package allow for the selection of a slideshow version with the slideshows 'off' initially, rather than 'on'.  Just uploading the new package and then moving the php scripts to the root and then using 'wxusfcsshow_noauto.php' rather than 'wxusfcsshow.php' should display slideshows that will need to be started by the user.  I made this version after I grew tired of seeing the slideshows display slides somewhere in the middle of the show when I switched to it.  The wxusfcsshow_auto.js is identical to wxusfcsshow.js and is included as a backup in case you want to copy the '_noauto' version, delete wxusfcsshow.js, rename the copy as wxusfcsshow.js and continue to use wxufscsshow.php to display them.

I would urge anyone who downloaded the previous package to download and use the new one.  My apologies for the broken scripts.

Regarding the 'ghost' image, I don't see that, Brad.  The package, like all of my scripts, relies heavily on a broadband connection in that it downloads ALL of the slideshows when first loaded.  The individual NWS graphics are small, just a few KB's, but they do add up.  The 'ghost' is probably there while the downloads are underway.  I'll look into this issue, but I'm not certain there's anything to do about it.
« Last Edit: January 06, 2013, 08:44:24 AM by gwwilk »
Regards, Jerry Wilkins
gwwilk@gmail.com

Offline MackerelSky

  • Contributor
  • ***
  • Posts: 113
    • McKean County Weather, Smethport Pa.
Re: New Script to Display US NWS Graphical Forecast Maps
« Reply #3 on: January 06, 2013, 10:08:01 AM »
Hi Jerry,

I definitely wasn't ragging about the setup, it went smooth during the install except the two minor items I brought up. I went with your setup with the main file in root and the rest in a separate directory because we all probably have to many files in the root of our sites already, at least I do...by no means were your scripts broken...

I was wondering if it was just me on the extra image since I'm on a sattelite connection and the latency can do that on occasion, so if no one else reports that as a problem, don't worry about it on this end...

Again, thanks for the scripts...
Brad
Mckean County Weather
Located on upper Marvin Creek
https://mckeanweather.com/
Davis VP2 + fars
Cumulus 1.9.4-b1092

 

Offline gwwilk

  • Southeast Lincoln Weather
  • Forecaster
  • *****
  • Posts: 2578
    • SouthEast Lincoln, NE Weather
Re: New Script to Display US NWS Graphical Forecast Maps
« Reply #4 on: January 06, 2013, 12:00:16 PM »
You're welcome, Brad.  I appreciate your keen eye and your help.

I'm still playing around with presentation, and here are a couple more php files that use unordered lists rather than a paragraph with line breaks in order to present the selections in a little more orderly fashion. They are included in the attached package, version 1b.  All scripts should validate at validator.w3c.org
« Last Edit: January 06, 2013, 12:08:48 PM by gwwilk »
Regards, Jerry Wilkins
gwwilk@gmail.com

Offline Dr Obbins

  • Forecaster
  • *****
  • Posts: 1152
Re: New Script to Display US NWS Graphical Forecast Maps
« Reply #5 on: January 06, 2013, 12:21:38 PM »
Nice Script!  =D&gt; Worked out of the box and was easy to customize to match the website style.
Thanks
NWS US Forecast Map Slideshows

Offline gwwilk

  • Southeast Lincoln Weather
  • Forecaster
  • *****
  • Posts: 2578
    • SouthEast Lincoln, NE Weather
Re: New Script to Display US NWS Graphical Forecast Maps
« Reply #6 on: January 06, 2013, 12:26:35 PM »
Thanks!  It looks good on your site. :-)

Links to the unordered list selectors on my site are no-auto-slideshow and auto-slideshow.
« Last Edit: January 06, 2013, 12:45:53 PM by gwwilk »
Regards, Jerry Wilkins
gwwilk@gmail.com

Offline MackerelSky

  • Contributor
  • ***
  • Posts: 113
    • McKean County Weather, Smethport Pa.
Re: New Script to Display US NWS Graphical Forecast Maps
« Reply #7 on: January 06, 2013, 01:19:30 PM »
I've re-downloaded the zip Jerry and see that you have added the 'no-auto' scripts and I'll have a play later today on Wamp and see which one I decide to put live, thanks for the efforts...

I've decided that since you are in Landlocked Nebraska that you haven't changed 'Wave Heigh' to 'Wave Height' in your php... :lol: dig dig dig *line 89*

All the best Jerry

Brad
« Last Edit: January 06, 2013, 01:35:41 PM by MackerelSky »
Mckean County Weather
Located on upper Marvin Creek
https://mckeanweather.com/
Davis VP2 + fars
Cumulus 1.9.4-b1092

 

Offline gwwilk

  • Southeast Lincoln Weather
  • Forecaster
  • *****
  • Posts: 2578
    • SouthEast Lincoln, NE Weather
Re: New Script to Display US NWS Graphical Forecast Maps
« Reply #8 on: January 06, 2013, 01:41:42 PM »
 :lol:  That messpelling propagated throughout all of the php scripts!  Thanks for picking up on that, Brad.

Amended files attached.
Regards, Jerry Wilkins
gwwilk@gmail.com

Offline Albuquerque Weather

  • Senior Contributor
  • ****
  • Posts: 265
    • Albuquerque Amateur Weather
Re: New Script to Display US NWS Graphical Forecast Maps
« Reply #9 on: January 06, 2013, 02:13:11 PM »
:lol:  That messpelling propagated throughout all of the php scripts!  Thanks for picking up on that, Brad.

Amended files attached.

Thankyou for all your efforts Jerry - much appreciated.
Ron

Offline tstorm

  • Contributor
  • ***
  • Posts: 141
    • Harpers Ferry Weather
Re: New Script to Display US NWS Graphical Forecast Maps
« Reply #10 on: January 10, 2013, 07:52:27 AM »
Thanks for the great script Jerry.

For anyone that's interested the NWS is accepting comments through May 31, 2013, on an experimental National Digital Forecast Database (NDFD) map viewer.

http://preview.weather.gov/graphical/

John

Offline Jumpin Joe

  • Forecaster
  • *****
  • Posts: 1073
    • Joe’s Weather
Re: New Script to Display US NWS Graphical Forecast Maps
« Reply #11 on: January 20, 2013, 06:31:11 PM »
Jerry, Thanks for another great script!  =D&gt;

Your efforts are greatly appreciated.

Joe
https://joesweather.info
Davis Vantage Pro 2 Plus 24-FARS Wireless
WeatherLink Live

Offline Bunty

  • Forecaster
  • *****
  • Posts: 2432
  • Stillwater, home of Oklahoma State University
    • Welcome to Stillwater Weather
Re: New Script to Display US NWS Graphical Forecast Maps
« Reply #12 on: January 21, 2013, 06:28:46 AM »
Here's mine after some customization:  http://stillwaterweather.com/wx/wxusfcsshow.php

Also the 2nd home page using modified AltDashboard 6.95 at http://stillwaterweather.com/2ndhome.php

Offline gwwilk

  • Southeast Lincoln Weather
  • Forecaster
  • *****
  • Posts: 2578
    • SouthEast Lincoln, NE Weather
Re: New Script to Display US NWS Graphical Forecast Maps
« Reply #13 on: January 21, 2013, 07:31:06 AM »
Here's mine after some customization:  http://stillwaterweather.com/wx/wxusfcsshow.php
Looks good, Bunty.  Just don't forget to correct my misspelled 'Heigh' :-)
Regards, Jerry Wilkins
gwwilk@gmail.com

Offline rrrick8

  • Senior Contributor
  • ****
  • Posts: 233
    • Vermilion weather
Re: New Script to Display US NWS Graphical Forecast Maps
« Reply #14 on: February 12, 2013, 04:47:45 PM »
Thanks for the script Jerry.
Have it going with a few cosmetic changes here
Severe Weather Manager-Vermilion County EMA
CWOP-CW9931 KILDANVI5

Offline tnwxman

  • Forecaster
  • *****
  • Posts: 423
  • KK4QXH
    • Weather for Lebanon, TN 37087
Re: New Script to Display US NWS Graphical Forecast Maps
« Reply #15 on: February 28, 2013, 09:33:01 PM »
Thank you Jerry for a great script.
Bob
KK4QXH

Offline mkutche

  • Forecaster
  • *****
  • Posts: 1043
    • GosportWx.com
Re: New Script to Display US NWS Graphical Forecast Maps
« Reply #16 on: December 04, 2016, 09:41:05 PM »
It worked before now not sure why it's not now. http://gosportwx.com/wxusfcsshow.php

edit: Forgot to change the script URL from ./WxUSFCSShow/scripts... to just ./scripts
« Last Edit: December 04, 2016, 09:47:33 PM by mkutche »
Mike K.
Davis Vantage Vue 6250 - CumulusMX (3.21.1-b3205)
Gosport, Indiana
Gosportwx.com twitter.com/GosportINWX
-----------------------------------------------------------

Offline jonnyj771

  • Senior Contributor
  • ****
  • Posts: 220
    • Lightning Weather
Re: New Script to Display US NWS Graphical Forecast Maps
« Reply #17 on: January 28, 2017, 06:38:24 PM »
Jerry,

Liking the script. However, I have an issue getting the image to show up. I had it at first, but now I cannot see the image. I believe it may be a permission issue. but unclear.
I am using this on the Leuven Template. I just took the original wxusfcsshow.php script and placed it in a Leuven script New page so I could contain the stylesheets.


Permissions are set like all the others at 755 (seems to work with all of the other pages as that is what my provider seems to authorize).
Can you provide any insight?
http://lightningweather.com/sl/index.php?p=USForecastPage&lang=en#data-area
Facebook:
Lightning Weather
   www.facebook.com/lightningweather
                             /groups/lightningweather
Lightning Weather Quad Cities
                             /lightningwxqc
                             /groups/lightningWXQC
Weather Station Hardware: Davis Vantage Pro2 6152
Weather Station Software: WD - 10.37S Build XXX (Beta)
Page Template: MeteoTemplate v1x. (Current Active)

Offline Jáchym

  • Meteotemplate Developer
  • Forecaster
  • *****
  • Posts: 8605
    • Meteotemplate
Re: New Script to Display US NWS Graphical Forecast Maps
« Reply #18 on: January 28, 2017, 06:48:17 PM »
Is your site working?

This is what I get:
This webpage is not available

Offline jonnyj771

  • Senior Contributor
  • ****
  • Posts: 220
    • Lightning Weather
Re: New Script to Display US NWS Graphical Forecast Maps
« Reply #19 on: January 28, 2017, 06:50:05 PM »
Is your site working?

This is what I get:
This webpage is not available

I have been doing updates...I had a minor glitch that I overlooked in the menu file...fixed already. You should be able to access the site now.

Facebook:
Lightning Weather
   www.facebook.com/lightningweather
                             /groups/lightningweather
Lightning Weather Quad Cities
                             /lightningwxqc
                             /groups/lightningWXQC
Weather Station Hardware: Davis Vantage Pro2 6152
Weather Station Software: WD - 10.37S Build XXX (Beta)
Page Template: MeteoTemplate v1x. (Current Active)

Offline Jáchym

  • Meteotemplate Developer
  • Forecaster
  • *****
  • Posts: 8605
    • Meteotemplate
Re: New Script to Display US NWS Graphical Forecast Maps
« Reply #20 on: January 28, 2017, 07:46:17 PM »
http://lightningweather.com/:

Quote
This webpage is not available

ERR_CONNECTION_REFUSED

Offline jonnyj771

  • Senior Contributor
  • ****
  • Posts: 220
    • Lightning Weather
Re: New Script to Display US NWS Graphical Forecast Maps
« Reply #21 on: January 28, 2017, 08:13:22 PM »
http://lightningweather.com/:

Quote
This webpage is not available

ERR_CONNECTION_REFUSED
Not sure why you are getting that error. I'm opening it fine on chrome

Sent from my SM-G935R4 using Tapatalk

Facebook:
Lightning Weather
   www.facebook.com/lightningweather
                             /groups/lightningweather
Lightning Weather Quad Cities
                             /lightningwxqc
                             /groups/lightningWXQC
Weather Station Hardware: Davis Vantage Pro2 6152
Weather Station Software: WD - 10.37S Build XXX (Beta)
Page Template: MeteoTemplate v1x. (Current Active)

Offline Jáchym

  • Meteotemplate Developer
  • Forecaster
  • *****
  • Posts: 8605
    • Meteotemplate
Re: New Script to Display US NWS Graphical Forecast Maps
« Reply #22 on: January 28, 2017, 08:26:56 PM »
Could it be that you are blocking European IPs? I can check when Im at work, I have VPN there so I can try U.S. IP

Offline jonnyj771

  • Senior Contributor
  • ****
  • Posts: 220
    • Lightning Weather
Re: New Script to Display US NWS Graphical Forecast Maps
« Reply #23 on: January 28, 2017, 09:17:18 PM »
Could it be that you are blocking European IPs? I can check when Im at work, I have VPN there so I can try U.S. IP
It shouldn't be blocked.
Wim has accessed it from Belgium before
Try going to http://lightningweather.com
first. Maybe that will help. I put the US forecast Page in the "Other Forecasts" sub menu
Sent from my SM-G935R4 using Tapatalk
« Last Edit: January 28, 2017, 09:20:12 PM by jonnyj771 »
Facebook:
Lightning Weather
   www.facebook.com/lightningweather
                             /groups/lightningweather
Lightning Weather Quad Cities
                             /lightningwxqc
                             /groups/lightningWXQC
Weather Station Hardware: Davis Vantage Pro2 6152
Weather Station Software: WD - 10.37S Build XXX (Beta)
Page Template: MeteoTemplate v1x. (Current Active)

Offline MackerelSky

  • Contributor
  • ***
  • Posts: 113
    • McKean County Weather, Smethport Pa.
Re: New Script to Display US NWS Graphical Forecast Maps
« Reply #24 on: January 28, 2017, 10:21:44 PM »
Hey Jon

Page loads fine, well, almost fine for me, but I think your problem is that you've made a mistake in your location of the main scripts for the slideshow. This section below, located at line 218 in your page should be up, inside of your </head> tag and not in the <body> part of your page.
Also remove that extra
</head>
<body>
at the end of it. It's just a copy and paste error. Get the part below into your head tag and you should be fine.

Code: [Select]
<!-- module wsusfcsshow.php ==== version: 1.0c -->
<link rel="stylesheet" type="text/css" href="./WU-History/WU-HistoryGray.css" />
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
<script src="./usa/WxUSFCSShow/scripts/swissarmy.js" type="text/javascript"></script>
<script src="./usa/WxUSFCSShow/scripts/wxusfcsshow.js" type="text/javascript"></script>

<style type="text/css">
/* Slideshow */
.hidden {
 display: none;
 margin: auto;
}
.visible {
 display:  block;
 margin: auto;
}
.center{
 margin: auto;
}

</style>
<script type="text/javascript">
window.onload=function(){show_tab2("d7tempfc")};
</script>
</head>
<body>
Mckean County Weather
Located on upper Marvin Creek
https://mckeanweather.com/
Davis VP2 + fars
Cumulus 1.9.4-b1092

 

 

anything