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?
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 4021) - 04 May 2024
Legacy Cumulus 1 release 1.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
Latest Cumulus MX V3 release 3.28.6 (build 3283) - 21 March 2024
Cumulus MX V4 beta test release 4.0.0 (build 4021) - 04 May 2024
Legacy Cumulus 1 release 1.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
Moderator: saratogaWX
-
- 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
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
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
- 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
In your html you have ..
... so where is your API key ?
Code: Select all
<script async="" defer="" src="https://maps.googleapis.com/maps/api/js?key=-replace-this-with-your-API-key-here-&language=en">
......................Imagine, what you will KNOW tomorrow !
-
- 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
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!
$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
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
-
- 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
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
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