Author Topic: NOAA Weather Radio Player scripts V3.00 now available  (Read 829 times)

0 Members and 1 Guest are viewing this topic.

Offline SteveFitz1

  • Forecaster
  • *****
  • Posts: 408
    • Tyler Texas Weather
Re: NOAA Weather Radio Player scripts V3.00 now available
« Reply #25 on: May 26, 2020, 07:36:37 PM »
You're doing it correctly.  The issue is that the *.tile.stamen.com tiles are HTTP and so in an HTTPS page (view-source) you'll see
Quote
// skipping Terrain2 due to http only map tile link while our page is https

since the tiles there wouldn't load.
I just tested, and https://{*}.tile.stamen.com/ accesses just fail.. no map returned, so those tiles only work when the loading page is http, not https.
Got it. Since I want everything secure, I'll have to pass on that option.

Thanks again.

Steve

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 7912
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: NOAA Weather Radio Player scripts V3.00 now available
« Reply #26 on: May 26, 2020, 07:44:18 PM »
I got the script to work in IE11. It seems some web browsers have an issue with .includes() so adding the code below fixed it for me.

Code: [Select]
String.prototype.includes = function (str) {
  var returnValue = false;

  if (this.indexOf(str) !== -1) {
    returnValue = true;
  }

  return returnValue;
}
Ok, that's brilliant.  I'm going to incorporate that into the distribution (after a typeof check for undefined).
Thanks!
Ken
Ken True/Saratoga, CA, USA main site: saratoga-weather.org
Davis VP1+ FARS, Boltek-PCI/NexStorm, microSferics ToA, Blitzortung RED, GRLevel3, WD, WL, VWS, Cumulus, Meteobridge/hub
Free weather PHP scripts/website templates - update notifications on Twitter saratogaWXPHP

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 7912
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: NOAA Weather Radio Player scripts V3.00 now available
« Reply #27 on: May 26, 2020, 08:42:04 PM »
And.. it's done (Version 3.02 - 26-May-2020).
Update to NWR-radios-leaflet.js to add
Code: [Select]
if(typeof String.prototype.includes == 'undefined') { /* shim function for IE11 */
String.prototype.includes = function (str,start) {
  var returnValue = false;
  var tststr = str;
if (typeof start == 'number') {
tststr = str.substr(start);
}
  if (this.indexOf(tststr) !== -1) {
    returnValue = true;
  }

  return returnValue;
  }
}
.. I found that Edge12+ supports the function, IE11- does not.  Thanks for the idea to have a shim.

wxradio.php, radios.php  add commented-out setting for NatGeo map, and add http-only note to 'Terrain' (stamen.com) map.

Updated the .zip and GitHub distributions.
Ken True/Saratoga, CA, USA main site: saratoga-weather.org
Davis VP1+ FARS, Boltek-PCI/NexStorm, microSferics ToA, Blitzortung RED, GRLevel3, WD, WL, VWS, Cumulus, Meteobridge/hub
Free weather PHP scripts/website templates - update notifications on Twitter saratogaWXPHP

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 7912
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: NOAA Weather Radio Player scripts V3.03 now available
« Reply #28 on: May 28, 2020, 09:55:26 PM »
Another update but just to NWR-coverage.php V3.03 to now use Settings.php $SITE['cacheFileDir'] for the directory location of the NWR-radios-data.js file updated by NWR-radios-data.php.

You can get it from the
script page or
GitHub distribution
or just Download NWR-coverage.php V3.03

This was a hidden bug from the release of 3.00 in December, 2019.  I couldn't understand how newly-added sites to noaaweatherradio.org weren't showing Propagation and Coverage overlays.. turns out the NWR-radios-data.php was updating the .js file in one place (./cache/ in Saratoga template) while the NWR-coverage.php was always looking for it in ./ (an old copy of NWR-radios-data.js).  Sigh... now fixed.
Ken True/Saratoga, CA, USA main site: saratoga-weather.org
Davis VP1+ FARS, Boltek-PCI/NexStorm, microSferics ToA, Blitzortung RED, GRLevel3, WD, WL, VWS, Cumulus, Meteobridge/hub
Free weather PHP scripts/website templates - update notifications on Twitter saratogaWXPHP

 

anything