Welcome to the Cumulus Support forum.

Latest Cumulus MX V3 release 3.28.6 (build 3283) - 21 March 2024

Cumulus MX V4 beta test release 4.0.0 (build 4017) - 17 March 2024

Legacy Cumulus 1 release v1.9.4 (build 1099) - 28 November 2014 (a patch is available for 1.9.4 build 1099 that extends the date range of drop-down menus to 2030)

Download the Software (Cumulus MX / Cumulus 1 and other related items) from the Wiki

NOAA Weather Radio

Discussion of Ken True's web site templates

Moderator: saratogaWX

Post Reply
acatalano
Posts: 92
Joined: Tue 16 Jun 2015 2:07 pm
Weather Station: Davis VP2
Operating System: Raspian, Win7 Pro
Location: Boulder, CO
Contact:

NOAA Weather Radio

Post by acatalano »

I have been streaming NOAA Weather Radio via noaaweatherradio.org and have been using wxradio.php on my website: http://www.boulderwx.com. Ken's page displays the map and the location of the radio on a google api generated map. This has been working very well for about a month or more. In order to implement this, one needs to get a Google Maps API key, which is free. Again, this has been easy to do, and just works...until now

Suddenly, yesterday the map would not display and the Javascript console shows an API key error. I've tried generating a new key, restricting it to http requests etc., but no matter what I've tried, the map displays briefly then generates the error. Of course the audio still works but no map.

I'm no Javascript programmer so I could use some advice. Coincidentally I just updated my out-of-date pages, but wxradios.php was not one of them. Any ideas?
Best Regards,
Anthony Catalano
Boulder, Colorado, USA
Webcam & Weather at:
http://www.boulderwx.com, http://www.apcat.org, http://www.boulderweather.org
Blitzortung Lightning Detector Station 1965
User avatar
beteljuice
Posts: 3292
Joined: Tue 09 Dec 2008 1:37 pm
Weather Station: None !
Operating System: W10 - Threadripper 16core, etc
Location: Dudley, West Midlands, UK

Re: NOAA Weather Radio

Post by beteljuice »

In your html you have ..

Code: Select all

<script async="" defer="" src="https://maps.googleapis.com/maps/api/js?key=-replace-this-with-your-API-key-here-&language=en">
... so where is your API key ?
Image
......................Imagine, what you will KNOW tomorrow !
acatalano
Posts: 92
Joined: Tue 16 Jun 2015 2:07 pm
Weather Station: Davis VP2
Operating System: Raspian, Win7 Pro
Location: Boulder, CO
Contact:

Re: NOAA Weather Radio

Post by acatalano »

I have been putting it after key= in single quotes within wxradio.php. That's where it has been from the start, and when it (used to) display the maps properly. There are actually two places to put the API key. I had inserted the key within wxradio.php file, where it seemed to work. However, at the top of the file Ken mentions that it can be put in settings.php so it applies site-wide. Like this:

$SITE['googleAPI'] = 'key goes here'; // key used for all Google Maps on site

Putting it in settings.php overides the one in wxradio.php. I kinda feel like I must be crazy...worked for a month or so, then without touching the file, it stops.

So I solved the problem with a new key by putting it in Settings.php, and now the map displays properly. Not sure why it stopped but it's working perfectly again!

Problem solved!
Best Regards,
Anthony Catalano
Boulder, Colorado, USA
Webcam & Weather at:
http://www.boulderwx.com, http://www.apcat.org, http://www.boulderweather.org
Blitzortung Lightning Detector Station 1965
acatalano
Posts: 92
Joined: Tue 16 Jun 2015 2:07 pm
Weather Station: Davis VP2
Operating System: Raspian, Win7 Pro
Location: Boulder, CO
Contact:

Re: NOAA Weather Radio

Post by acatalano »

After re-reading my post I want to clarify the solution. The problem arose with the Googlemaps API key within wxradio.php. It was apparently solved by putting it into settings.php as shown in the post.
Best Regards,
Anthony Catalano
Boulder, Colorado, USA
Webcam & Weather at:
http://www.boulderwx.com, http://www.apcat.org, http://www.boulderweather.org
Blitzortung Lightning Detector Station 1965
Post Reply