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?
Please read the posts in the Announcements section about the current status of Cumulus development now that I have retired
Please read this post before posting
Latest Cumulus release v1.9.4 (build 1099) - Nov 28 2014
Latest Cumulus MX release - v3.0.0 build 3043 Jan 20 2017. See this post for download
Please read this post before posting
Latest Cumulus release v1.9.4 (build 1099) - Nov 28 2014
Latest Cumulus MX release - v3.0.0 build 3043 Jan 20 2017. See this post for download
NOAA Weather Radio
Moderator: saratogaWX
-
- Posts: 90
- Joined: Tue Jun 16, 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: 2463
- Joined: Tue Dec 09, 2008 1:37 pm
- Weather Station: None !
- Operating System: XP SP3 - honest
- 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: 90
- Joined: Tue Jun 16, 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: 90
- Joined: Tue Jun 16, 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
Return to “Saratoga Templates”
Who is online
Users browsing this forum: No registered users and 2 guests