Author Topic: WXUSALERTS Clickable Alerts Map Script  (Read 20242 times)

0 Members and 1 Guest are viewing this topic.

Offline mikeym2m

  • Senior Contributor
  • ****
  • Posts: 153
    • MikeyM's Thornhurst PA Weather
Re: WXUSALERTS Clickable Alerts Map Script
« Reply #100 on: December 08, 2017, 03:26:49 PM »
Yes, thanks Jerry

Cheers

 :grin:

MikeyM

Offline lstrip

  • Member
  • *
  • Posts: 30
Re: WXUSALERTS Clickable Alerts Map Script
« Reply #101 on: March 10, 2018, 08:03:30 PM »
Has this service been discontinued?
clicking on southern region does not work.
thanks
Larry

Offline gwwilk

  • Southeast Lincoln Weather
  • Forecaster
  • *****
  • Posts: 2578
    • SouthEast Lincoln, NE Weather
Re: WXUSALERTS Clickable Alerts Map Script
« Reply #102 on: March 10, 2018, 09:03:52 PM »
Thanks for the heads-up, Larry!

An updated zip is available on my site as 'wxusalerts.zip'.
Regards, Jerry Wilkins
gwwilk@gmail.com

Offline lstrip

  • Member
  • *
  • Posts: 30
Re: WXUSALERTS Clickable Alerts Map Script
« Reply #103 on: March 12, 2018, 03:25:42 PM »
thanks for the update Jerry!

Offline ValentineWeather

  • Forecaster
  • *****
  • Posts: 6364
    • Valentine Nebraska's Real-Time Weather
Re: WXUSALERTS Clickable Alerts Map Script
« Reply #104 on: April 08, 2018, 10:22:52 PM »
Thanks I just caught this also.
Randy

Offline gwwilk

  • Southeast Lincoln Weather
  • Forecaster
  • *****
  • Posts: 2578
    • SouthEast Lincoln, NE Weather
Re: WXUSALERTS Clickable Alerts Map Script
« Reply #105 on: July 05, 2018, 03:38:32 PM »
The NWS's transition to SSL is in progress.  There's an updated zip of this script on my web site that uses 'https://' exclusively and that has valid links (regional headquarters no longer host any of the WFO's sites--all 'weather.gov' now).
Regards, Jerry Wilkins
gwwilk@gmail.com

Offline ValentineWeather

  • Forecaster
  • *****
  • Posts: 6364
    • Valentine Nebraska's Real-Time Weather
Re: WXUSALERTS Clickable Alerts Map Script
« Reply #106 on: July 05, 2018, 05:24:46 PM »
Got  it thanks Jerry.  =D>
Randy

Offline jgillett

  • Forecaster
  • *****
  • Posts: 1187
  • Boltek, Win7 Pro, ToA
    • TiggrWeather Phoenix
Re: WXUSALERTS Clickable Alerts Map Script
« Reply #107 on: July 05, 2018, 05:48:27 PM »
Thanks, Jerry.
John
W7JKG

Offline mldenison

  • Contributor
  • ***
  • Posts: 111
    • York, PA Weather
Re: WXUSALERTS Clickable Alerts Map Script
« Reply #108 on: July 05, 2018, 08:03:49 PM »
Cool script.  I just put it on my Saratoga website.

I haven't modified the wxusalerts.php file and I'm not sure how to get it to fit in with the rest of the page.
Windows 7 x64
Weather PC: Intel NUC
Davis Vantage Pro 2
Weather Underground: KPAYORK30
York, PA Weather (Saratoga)
York, PA Weather (Leuven)
York, PA PWS Station

Offline gwwilk

  • Southeast Lincoln Weather
  • Forecaster
  • *****
  • Posts: 2578
    • SouthEast Lincoln, NE Weather
Re: WXUSALERTS Clickable Alerts Map Script
« Reply #109 on: July 05, 2018, 08:39:24 PM »
I haven't modified the wxusalerts.php file and I'm not sure how to get it to fit in with the rest of the page.
Actually, there's no way (short of incurring days of work along with massive headaches) to change the size of this map because of the hard-coded WFO areas that are 'clickable'.  I've just allowed it to occupy the space it needs while overhanging the normal narrow Saratoga template's right margin.  I've centered it in Saratoga Widescreen mode, however.
Regards, Jerry Wilkins
gwwilk@gmail.com

Offline mldenison

  • Contributor
  • ***
  • Posts: 111
    • York, PA Weather
Re: WXUSALERTS Clickable Alerts Map Script
« Reply #110 on: July 05, 2018, 08:42:45 PM »
Thanks, Jerry.  I believe it looks fine, just bigger.
Windows 7 x64
Weather PC: Intel NUC
Davis Vantage Pro 2
Weather Underground: KPAYORK30
York, PA Weather (Saratoga)
York, PA Weather (Leuven)
York, PA PWS Station

Offline Jasiu

  • Forecaster
  • *****
  • Posts: 947
    • LexMAWeather
Re: WXUSALERTS Clickable Alerts Map Script
« Reply #111 on: July 06, 2018, 08:37:07 PM »
Quote
Actually, there's no way (short of incurring days of work along with massive headaches) to change the size of this map because of the hard-coded WFO areas that are 'clickable'.  I've just allowed it to occupy the space it needs while overhanging the normal narrow Saratoga template's right margin.  I've centered it in Saratoga Widescreen mode, however.

Thankfully, someone out there has already done the work in jQuery and it actually works (I'm using it).

  https://www.jqueryscript.net/other/jQuery-Plugin-For-Responsive-Image-Maps-image-map-js.html

Check out
   https://lexmaweather.info/usalerts.php

(edit: fixed link - was to my "sandbox" before)

All I had to do was include the plugin and then add three lines of jQuery (one for each map). Magic!
« Last Edit: July 06, 2018, 08:59:09 PM by Jasiu »
https://lexmaweather.info
On Mastodon: @LexMAWeather@toot.community

Offline mikeym2m

  • Senior Contributor
  • ****
  • Posts: 153
    • MikeyM's Thornhurst PA Weather
Re: WXUSALERTS Clickable Alerts Map Script
« Reply #112 on: July 06, 2018, 08:54:25 PM »
Jerry

As always - THANKS! \:D/

Cheers

 :grin:

MikeyM

Offline gwwilk

  • Southeast Lincoln Weather
  • Forecaster
  • *****
  • Posts: 2578
    • SouthEast Lincoln, NE Weather
Re: WXUSALERTS Clickable Alerts Map Script
« Reply #113 on: July 06, 2018, 09:39:40 PM »
Quote
Actually, there's no way (short of incurring days of work along with massive headaches) to change the size of this map because of the hard-coded WFO areas that are 'clickable'.  I've just allowed it to occupy the space it needs while overhanging the normal narrow Saratoga template's right margin.  I've centered it in Saratoga Widescreen mode, however.

Thankfully, someone out there has already done the work in jQuery and it actually works (I'm using it).

  https://www.jqueryscript.net/other/jQuery-Plugin-For-Responsive-Image-Maps-image-map-js.html

Check out
   https://lexmaweather.info/usalerts.php

(edit: fixed link - was to my "sandbox" before)

All I had to do was include the plugin and then add three lines of jQuery (one for each map). Magic!
Great find, jasiu! This jQuery plugin was written some time after I purloined/adapted the NWS Home Page.  :-)

Your NWS Home Page adaptation looks super and works well.

I've downloaded the plugin and will play with it when I get a chance.
Regards, Jerry Wilkins
gwwilk@gmail.com

Offline Jasiu

  • Forecaster
  • *****
  • Posts: 947
    • LexMAWeather
Re: WXUSALERTS Clickable Alerts Map Script
« Reply #114 on: July 06, 2018, 10:06:02 PM »
Glad to be a help Jerry (I'm used to just getting in people's way :) ).

Another note: The links that still use www.prh.noaa.gov (Hawaii, Guam, Samoa) should still be http - they haven't been switched over to https yet (just checked on www.weather.gov). I was getting the firefox "this site does not seem to be secured" message.
https://lexmaweather.info
On Mastodon: @LexMAWeather@toot.community

Offline gwwilk

  • Southeast Lincoln Weather
  • Forecaster
  • *****
  • Posts: 2578
    • SouthEast Lincoln, NE Weather
Re: WXUSALERTS Clickable Alerts Map Script
« Reply #115 on: July 08, 2018, 03:44:53 PM »
Thanks to jaisu's great find and groundbreaking script which he was kind enough to share with me and to help me get a resizing version of WXUSALERTS up and running!

My menu contains the new resized alerts map as well as the old fixed-size map.  The resized map doesn't auto-update, but that is a frill at best.

You can see the variably-sizing map at work if you scroll down and Set 'Widescreen'.

Thanks again, jaisu! =D> \:D/ =D>
« Last Edit: July 08, 2018, 03:47:53 PM by gwwilk »
Regards, Jerry Wilkins
gwwilk@gmail.com

Offline mldenison

  • Contributor
  • ***
  • Posts: 111
    • York, PA Weather
Re: WXUSALERTS Clickable Alerts Map Script
« Reply #116 on: July 08, 2018, 03:54:54 PM »
That looks perfect!  How do we implement it?  Nevermind.  Found it  \:D/
« Last Edit: July 08, 2018, 04:00:29 PM by mldenison »
Windows 7 x64
Weather PC: Intel NUC
Davis Vantage Pro 2
Weather Underground: KPAYORK30
York, PA Weather (Saratoga)
York, PA Weather (Leuven)
York, PA PWS Station

Offline gwwilk

  • Southeast Lincoln Weather
  • Forecaster
  • *****
  • Posts: 2578
    • SouthEast Lincoln, NE Weather
Re: WXUSALERTS Clickable Alerts Map Script
« Reply #117 on: July 08, 2018, 04:01:48 PM »
It’s currently set up for the Saratoga template.  Other templates users will have to customize it for their sites. Sorry.

Glad you found it!  I forgot to mention the lone setting, $divWidth.
« Last Edit: July 08, 2018, 04:04:15 PM by gwwilk »
Regards, Jerry Wilkins
gwwilk@gmail.com

Offline mldenison

  • Contributor
  • ***
  • Posts: 111
    • York, PA Weather
Re: WXUSALERTS Clickable Alerts Map Script
« Reply #118 on: July 08, 2018, 04:06:13 PM »
I dropped it in.  When I click on PA, I get MI.
Windows 7 x64
Weather PC: Intel NUC
Davis Vantage Pro 2
Weather Underground: KPAYORK30
York, PA Weather (Saratoga)
York, PA Weather (Leuven)
York, PA PWS Station

Offline Jasiu

  • Forecaster
  • *****
  • Posts: 947
    • LexMAWeather
Re: WXUSALERTS Clickable Alerts Map Script
« Reply #119 on: July 08, 2018, 04:35:19 PM »
I know what the issue is and sent a message to Jerry.  Hopefully fixed soon.
https://lexmaweather.info
On Mastodon: @LexMAWeather@toot.community

Offline gwwilk

  • Southeast Lincoln Weather
  • Forecaster
  • *****
  • Posts: 2578
    • SouthEast Lincoln, NE Weather
Re: WXUSALERTS Clickable Alerts Map Script
« Reply #120 on: July 08, 2018, 04:44:36 PM »
Should be fixed now.  I also initially failed to include 'image-map.min.js' to be placed in the directory of your choice.  I added a second setting which is the directory variable that points to the location of 'image-map.min.js'.

Sorry about that! :oops:

New zip is in place.
Regards, Jerry Wilkins
gwwilk@gmail.com

Offline mldenison

  • Contributor
  • ***
  • Posts: 111
    • York, PA Weather
Re: WXUSALERTS Clickable Alerts Map Script
« Reply #121 on: July 08, 2018, 07:07:19 PM »
Good job, folks.  It's a wrap!
Windows 7 x64
Weather PC: Intel NUC
Davis Vantage Pro 2
Weather Underground: KPAYORK30
York, PA Weather (Saratoga)
York, PA Weather (Leuven)
York, PA PWS Station

Offline gwwilk

  • Southeast Lincoln Weather
  • Forecaster
  • *****
  • Posts: 2578
    • SouthEast Lincoln, NE Weather
Re: WXUSALERTS Clickable Alerts Map Script
« Reply #122 on: July 10, 2018, 03:33:24 PM »
Not quite a wrap until I fixed a missing terminal space that resulted from adding the 'New Tab' title to the Legend members which caused validation to fail.  The wxuselerts-varsize.php script now validates once again, and a new zip is on my site.
Regards, Jerry Wilkins
gwwilk@gmail.com

 

anything