WXforum.net
Web Weather => Weather Website PHP/AJAX scripting => Topic started by: ELDoradoWx on July 16, 2010, 04:30:50 AM
-
This script is pretty easy to install. I think it's pretty straight forward. I have also developed quite some time ago the AniS (AnimationS applet) Java code needed to exactly replicate NWS radar stations animated radar that I may post up sometime later, but first I'll do the Google Maps Radar since its popularity and usefulness is sky rocketing world wide. Radar on Google Maps is kind of cool because you can see what it is doing right in your own back yard.
Sample Single Radar Page:
http://www.eldoradocountyweather.com/current/misc/google-maps/dax/ridge.html (http://www.eldoradocountyweather.com/current/misc/google-maps/dax/ridge.html)
Sample Multi Radar Page:
http://www.eldoradocountyweather.com/radar/radar-google/florida/florida-radar.html
The most current installation instructions, can be found on my scripts page:
http://www.eldoradocountyweather.com/scripts/weather-scripts.php#us-gmap-ani-radar (http://www.eldoradocountyweather.com/scripts/weather-scripts.php#us-gmap-ani-radar)
Radar on Relief Map with Open Street Map overlay
This is the Demo Page for the new "Relief Map with an Open Street Maps overlay".
http://www.eldoradocountyweather.com/current/misc/google-maps/geo-google-radarmap/geo-ridge.html
The map includes the other default map types as well. The map includes, Relief, OSE [OpenStreetMaps], Satellite, Terrain, Hybrid and the regular Map.
I feel that OpenStreetMap is the best FREE street map on the net, which I contribute work to. It is available on the new map by selecting the Relief or OSM mapping options. To view the Hybrid map, select the Satellite map option and click on Layer and select Google Labels.
View the Open Street Map on Google Maps V3:
http://www.eldoradocountyweather.com/current/misc/google-maps/google-maps-v3/v3-openstreetmap.php
I will not be supporting this special map version but I wanted to offer it as another choice.
For customizing it please refer to prior posts in this thread as a guide or on my site. You can grab the code by doing a View Source Code on the page.
All of my other scripts including this one can be found here:
http://www.eldoradocountyweather.com/scripts/weather-scripts.php
Last Edited on 8/4/2011
-
OUTSTANDING!
I run two simple NWS RADARs (El Paso & Holloman AFB) on my site but always wanted the "Terrain - Satellite" options. This takes care of it and lets me add more RADARs along the common travel routes.
Outstanding! Thanks for sharing this!
-
very cool
Andrew
-
Hey Danny! It works great but I've experienced one problem, and I'm sure it only has to do with the number of radars I'm displaying. Once the window loads the loop gets slower and slower until the window, for all practical purposes, becomes unresponsive. The Chrome window runs about 50% CPU utilization but very little disk utilization. Right now it's loading 8 different radars.
You can try it here: http://www.daculaweather.com/ridge_georgia_master.php (This was an incorrect link if anyone clicked here, fixed now)
-
You're not slowing down for me, Steve. Runs fine with FF 3.6.6.
-
Good to know! Thanks! And you're right! i just tried it in IE8 and FF 3.5.6 and it loaded and ran faster. That's good, I was afraid 9 sites might be too many.
-
Congratulations Danny! This is very slick and very easy to setup.
You'll need to play around with zoom level and the number of radar sites you want to include. I think 9-10 might be a practical limit but your mileage might vary. The more you zoom out the more sites need to be included. You can see the area covered on mine and I could have included Nashville and Knoxville but didn't.
-
Thanks everyone! I'm glad you like it...
I have been running these scripts for close to 2 years and have never run into the slow down issue Steve is referring to. I have tested it in Firefox 2.xx+ and in IE6, IE7 and IE8.
Concerning the maximum number of radar sites per map, this is a good point. I think you need to do it in moderation realizing that the general public runs at many different Internet speeds. At high speeds like what I am used to running I could put in 20 radar sites per map with no ill effects, but someone with dial up may never get it to completely load up.
I run 8 radars on my Texas map,
http://www.eldoradocountyweather.com/radar/radar-google/texas/texas-radar.html (http://www.eldoradocountyweather.com/radar/radar-google/texas/texas-radar.html)
and it completely loads up in 6 seconds. Keeping the lower Internet speeds in mind, I think you need to be a bit careful on how many radar sites per map you use. It is probably better to make more maps than to cram too many stations onto one map.
-
I've created 5 maps, they're located off my main page under the Radar menu.
-
Good point about the slow loaders - I didn't think about that. I'm using 7 RADARs - and it's a good thing I can't use Mexican radar or I would have Chihuahua in there too.
The default zoom of 7 is perfect for me!
Glad to see this thread is a sticky. This is definitely a nice addition!
-
This a great script, Danny, but my map will not display any radar and I know I followed your directions carefully. Any ideas why this is?
-
This a great script, Danny, but my map will not display any radar and I know I followed your directions carefully. Any ideas why this is?
I had that problem one time and it was because I had added the radar sites but didn't change the lat/lon in the file. The map wasn't centered in the right place to see them.
-
Thanks Steve, but I know I set the latitude and longitude properly :)
-
This a great script, Danny, but my map will not display any radar and I know I followed your directions carefully. Any ideas why this is?
Go ahead and post a link to your ridge.html file and I would be more than happy to take a look at it for you.. If you included ridge.html from another page, please let me see that page as well.
-
Got it working Danny! Thanks!
-
Here is the link, thanks:
http://www.beamsvillewx.ca/wxridgeradar.php (http://www.beamsvillewx.ca/wxridgeradar.php)
-
Go to here and copy the code...
http://www.daculaweather.com/ridge_test.html
-
You'll probably want to add some more radar to fill in the areas around the Buffalo radar. You can remove me css or change it to suit your needs.
-
Thanks, Steve, but I'm getting an "Error 404: File Not Found" message from your link.
-
It should be there now...
-
That did it, thanks Steve :)
-
Here is the link, thanks:
http://www.beamsvillewx.ca/wxridgeradar.php (http://www.beamsvillewx.ca/wxridgeradar.php)
I see you got it fixed! Very Cool...
Just so you know the problem was from extra code in the javascript..
Changing this -
Radar[i].feed(stub+" &rid="+Ridge[i]+"&product="+Product);
To this - fixed the problem
Radar[i].feed(stub+" &rid="+Ridge[i]+"&product="+Product);
In other words it was changing this
&
To this
&
My guess is you were probably just trying to validate your code and made the necessary changes which broke the script..
-
Please check the first post for any changes or additions to the script.. Any changes made will be added on to the first instructional post..
-
Danny,
This is terrific. Thanks for the great work. Where I live we are not covered very well by any radar. Being able to plot the five closest gives a better picture of what is coming. Check it out here:
http://www.jayswoodfurniture.com/wx/radar/ridge.html
Great job and thanks,
Jay
-
Hi Danny: Would it be possible for a visitor to choose up to a certain number of radars for viewing?
-
Hi Danny: Would it be possible for a visitor to choose up to a certain number of radars for viewing?
Yes something like that could be done with many different ways in which to do it.
-
Danny,
Great script. Got a couple of questions.
1) Where in the code can I remove the URLs that display below the map?
2) I'm able to display 6 radar sites with no problem using "NCR". However, when I try to use either "N0R" or "N0Z", I don't see any radar sites. I'm making sure the middle character is the number zero "0". I attempted it with just a single site (SHV) and still was not able to see any radar.
Any suggestions?
Thanks,
Steve
-
Hi Steve,
Give the code below a try, I set it up for you to use "SHV" and "N0R". It works with "N0V" as well. Just put in your Google Maps key number.
<html>
<head>
<script src="http://maps.google.com/maps?file=api&v=2&key=your-key-number-goes-here" type="text/javascript">
</script>
<script src="http://www.eldoradocountyweather.com/current/misc/google-maps/dax/radar.js"></script>
<script src="http://www.eldoradocountyweather.com/current/misc/google-maps/dax/ridge.js"></script>
<script>
var Clock ;
var Cycle ;
var Google;
var Helper;
var Last= 0;
var Skew= 0;
var Wrap= 10;
var Idle=100;
var Back=500;
var Radar=[];
var Ridge=["SHV"];
var Product="N0R";
function Pause(pause)
{
Idle=pause*10;
Back=pause*50;
}
function Opacity(opacity)
{
for (var i=0;Ridge[i];i++)
{
Radar[i].opacity(opacity);
}
}
function Loop()
{
for (var i=0;Ridge[i];i++)
{
Helper.childNodes[i].childNodes[0].data=Radar[i].select(Last);
}
Last=(Last+1)%Wrap;
Clock=clearTimeout(Clock);
Clock=setTimeout("Loop()",Last ? Idle : Back);
}
function Feed()
{
var stub="http://www.srh.noaa.gov/ridge2/JSON_generator.php?callback=CallBack&frames="+Wrap;
for (var i=0;Ridge[i];i++)
{
Radar[i].feed(stub+"&rid="+Ridge[i]+"&product="+Product);
}
Cycle=clearTimeout(Cycle);
Cycle=setTimeout("Feed()",150000);
}
function CallBack(callback)
{
var stub="http://www.srh.noaa.gov/";
var pair;
var reload=[];
for (var i=0;callback.directory[i];i++)
{
pair=callback.directory[i].match(/([A-Z][A-Z][A-Z]|[A-Z][0-9][A-Z])/g);
reload[i]=stub+callback.directory[i];
}
for (var i=0;Ridge[i];i++)
{
if (pair) if (pair[0]==Product) if (pair[1]==Ridge[i]) Radar[i].reload(reload);
}
}
function Load()
{
Google=document.getElementById("google");
Google.style.width ="640px";
Google.style.height="640px";
GDraggableObject.setDraggableCursor("pointer");
GDraggableObject.setDraggingCursor ("pointer");
Google=new GMap2(Google);
Google.setCenter (new GLatLng(32.447,-93.837),7, G_PHYSICAL_MAP);
Google.setUIToDefault();
Helper=document.getElementById("helper");
for (var i=0;Ridge[i];i++)
{
Helper.appendChild(document.createElement("DIV"));
Helper.childNodes[i].appendChild(document.createTextNode(""));
Radar[i]=new FrameAnimationLayerOverlay({bbox:BBox(Ridge[i],Product),size:{x:640,y:640},last:Last,skew:Skew,wrap:Wrap,name:Ridge[i]+"_"+Product});
Google.addOverlay(Radar[i]);
}
Feed();
Loop();
}
function Free()
{
GUnload();
}
</script>
</head>
<body onload="Load();" onunload="Free();">
<br/><br/><br/><br/>
<div style="text-indent:0px; width:100%; height:100%; font-family:arial; font-size:14px; font-weight:normal; overflow:hidden;" align="center">
<div id="google"></div>
<div id="helper"></div>
<div>
<input type="radio" name="pause" onclick="Pause( 5);"> Extra Fast
<input type="radio" name="pause" onclick="Pause( 8);"> Fast
<input type="radio" name="pause" onclick="Pause(12);"> Medium
<input type="radio" name="pause" onclick="Pause(18);"> Slow
<input type="radio" name="pause" onclick="Pause(25);"> Extra Slow
<input type="radio" name="pause" onclick="Pause( 2000);"> Pause
</div>
<div>Opacity
<input type="radio" name="opacity" onclick="Opacity(0.25);"> 25%
<input type="radio" name="opacity" onclick="Opacity(0.50);"> 50%
<input type="radio" name="opacity" onclick="Opacity(0.75);"> 75%
<input type="radio" name="opacity" onclick="Opacity(1.00);"> 100%
</div>
</div>
</body>
</html>
-
Danny,
That worked. Thanks very much.
However, it introduced a new problem. If I add more than 2 radar sites, the radar controls start getting pushed off the page. 3 radar sites leaves 1 line of controls and 4 sites completely eliminate all the controls.
Also, is there a way to display only the controls and not the URLs for each gif?
Thanks again for your help.
Steve
-
Please give me a link to your radar page and I will take a look at what you are referring to..
Here is a sample page running 6 radars centered on SHV..
http://www.eldoradocountyweather.com/current/misc/google-maps/shv/ridge-shv.html (http://www.eldoradocountyweather.com/current/misc/google-maps/shv/ridge-shv.html)
-
Danny,
The problem is visible on the URL you sent me. If you look just below the map, you'll see 4 URLs (not 6) pointing to GIFs, and the radar controls are not present.
Steve
-
Steve,
I see all the information on the page. The problem is probably the resolution of your monitor. Try increasing it and see what it looks like.
Jay
-
I just made an interesting discovery. The page doesn't allow for scrolling. (In IE8, it shows a scrollbar, but it doesn't move.)
I normally use Firefox as my browser. When I tried the site with Opera, I have no browser toolbars, so my viewing area is much larger. With Opera I was able to see all 6 URLs as well as the radar controls. When I tried it in IE8, I had several browser toolbars. Initially only 4 URLs showed. By turning off a couple of toolbars, the viewing area increased enough to see a fifth URL. I see the same effect with Firefox.
So, at least from what I can tell, the display of the radar map isn't currently scrollable. If it were, the browser viewing area shouldn't matter and all the URLs and radar controls should show when scrolled to.
Danny, what do you think?
Thanks.
Steve
-
I ran mine in a iframe and it works in IE8, Firefox, and Chrome and this one loads 10 different radars.
http://www.daculaweather.com/ridge_georgia_master.html
-
Steve,
It works for me as well in an IFRAME. Don't know why it's not scrolling when it's standalone. :-(
Steve
-
I just made an interesting discovery. The page doesn't allow for scrolling. (In IE8, it shows a scrollbar, but it doesn't move.)
I normally use Firefox as my browser. When I tried the site with Opera, I have no browser toolbars, so my viewing area is much larger. With Opera I was able to see all 6 URLs as well as the radar controls. When I tried it in IE8, I had several browser toolbars. Initially only 4 URLs showed. By turning off a couple of toolbars, the viewing area increased enough to see a fifth URL. I see the same effect with Firefox.
So, at least from what I can tell, the display of the radar map isn't currently scrollable. If it were, the browser viewing area shouldn't matter and all the URLs and radar controls should show when scrolled to.
Danny, what do you think?
Thanks.
Steve
Hi Steve,
I'm sure sorry you've been having problems running the scripts! I'm not quite sure what is causing the disappearing act on your radar display and not being able to scroll down. I haven't run into that problem before. It sounds like you have it up and running well now with the iframe method. Glad to hear it!
Just an FYI - You can resize the radar graphic to any size you want. I wrote instructions on how to resize in the first post. NOAA runs theirs at 600 x 550... By default I made the graphic larger than normal (640x640) so it looked a bit better displaying multiple radars. It sounds like you might have a lower resolution monitor and/or graphics card. Perhaps running it around 540 x 495 would be a better fit for you?
-
Hey Danny,
Not sure what the problem is. My resolution is 1440x900, so I doubt that's the problem.
I'll be using the script inside an IFRAME since it works fine there.
By the way, how can I prevent the URLs from displaying and only show the radar controls?
Thanks,
Steve
-
Hey Danny,
Not sure what the problem is. My resolution is 1440x900, so I doubt that's the problem.
I'll be using the script inside an IFRAME since it works fine there.
By the way, how can I prevent the URLs from displaying and only show the radar controls?
Thanks,
Steve
The controls section of the code can be copied to your main page right under where you have the iframe and then deletes from the original ridge.html source code. You can then adjust the iframe height to show the radar graphic only along with the "scrolling=no" iframe parameter...
-
I have a question about animation If i know the path of my images For example:
http://localhost/test/1.png
http://localhost/test/2.png
http://localhost/test/3.png
http://localhost/test/4.png
http://localhost/test/5.png
What should i change in your code?
Best regards
-
I have a question about animation If i know the path of my images For example:
http://localhost/test/1.png
http://localhost/test/2.png
http://localhost/test/3.png
http://localhost/test/4.png
http://localhost/test/5.png
What should i change in your code?
Best regards
I just responded to the email you sent me on this same question.
-
I got the map up and running with my adjacent local radar sites and that part is fine.But when I include it
into my WD template set I get erratic spacing and I loose the ability to set it for wide screen view.
It is located here http://www.smythweather.net/wxridge.php
Any help greatly appreciated! I seem to have ran into a similar situation before but I can't recall what was done
to rectify it and no notes can be found either duh!
Regards,
Wayne
-
I got the map up and running with my adjacent local radar sites and that part is fine.But when I include it
into my WD template set I get erratic spacing and I loose the ability to set it for wide screen view.
Hi Wayne,
I keep a full set of WD Ajax PHP templates on hand as a test bed and I put your custom radar up on it. The code for it is posted below. Hopefully this will give you a basic base on which to get started on.
The sample page for it is at:
http://www.eldoradocountyweather.com/wd-alt/google.php (http://www.eldoradocountyweather.com/wd-alt/google.php)
<?php
############################################################################
# A Project of TNET Services, Inc. and Saratoga-Weather.org (WD-USA template set)
############################################################################
#
# Project: Sample Included Website Design
# Module: sample.php
# Purpose: Sample Page
# Authors: Kevin W. Reed <kreed@tnet.com>
# TNET Services, Inc.
#
# Copyright: (c) 1992-2007 Copyright TNET Services, Inc.
############################################################################
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
############################################################################
# This document uses Tab 4 Settings
############################################################################
require_once("Settings.php");
require_once("common.php");
############################################################################
$TITLE= $SITE['organ'] . " - Sample Blank Page";
$showGizmo = true; // set to false to exclude the gizmo
include("top.php");
############################################################################
?>
<script src="http://maps.google.com/maps?file=api&v=2&key=ABQIAAAApVH5R1WAZavUfa72-vDaqBSF8lR4t3ETuN5S-hDg3GOCtY7pxRTQgZqT9nvKpwT704A3pifYCY1RYw" type="text/javascript">
</script>
<script src="http://www.eldoradocountyweather.com/current/misc/google-maps/dax/radar.js"></script>
<script src="http://www.eldoradocountyweather.com/current/misc/google-maps/dax/ridge.js"></script>
<script>
var Clock ;
var Cycle ;
var Google;
var Helper;
var Last= 0;
var Skew= 0;
var Wrap= 10;
var Idle=100;
var Back=500;
var Radar=[];
var Ridge=["FCX","MRX","RLX","AKQ","RAX"];
var Product="NCR";
function Pause(pause)
{
Idle=pause*10;
Back=pause*50;
}
function Opacity(opacity)
{
for (var i=0;Ridge[i];i++)
{
Radar[i].opacity(opacity);
}
}
function Loop()
{
for (var i=0;Ridge[i];i++)
{
Helper.childNodes[i].childNodes[0].data=Radar[i].select(Last);
}
Last=(Last+1)%Wrap;
Clock=clearTimeout(Clock);
Clock=setTimeout("Loop()",Last ? Idle : Back);
}
function Feed()
{
var stub="http://www.srh.noaa.gov/ridge2/JSON_generator.php?callback=CallBack&frames="+Wrap;
for (var i=0;Ridge[i];i++)
{
Radar[i].feed(stub+"&rid="+Ridge[i]+"&product="+Product);
}
Cycle=clearTimeout(Cycle);
Cycle=setTimeout("Feed()",150000);
}
function CallBack(callback)
{
var stub="http://www.srh.noaa.gov/";
var pair;
var reload=[];
for (var i=0;callback.directory[i];i++)
{
pair=callback.directory[i].match(/([A-Z][A-Z][A-Z]|[A-Z][0-9][A-Z])/g);
reload[i]=stub+callback.directory[i];
}
for (var i=0;Ridge[i];i++)
{
if (pair) if (pair[0]==Product) if (pair[1]==Ridge[i]) Radar[i].reload(reload);
}
}
function Load()
{
Google=document.getElementById("google");
Google.style.width ="650px";
Google.style.height="650px";
GDraggableObject.setDraggableCursor("pointer");
GDraggableObject.setDraggingCursor ("pointer");
Google=new GMap2(Google);
Google.setCenter (new GLatLng(37.164,-080.269),7, G_PHYSICAL_MAP);
Google.setUIToDefault();
Helper=document.getElementById("helper");
for (var i=0;Ridge[i];i++)
{
Helper.appendChild(document.createElement("DIV"));
Helper.childNodes[i].appendChild(document.createTextNode(""));
Radar[i]=new FrameAnimationLayerOverlay({bbox:BBox(Ridge[i],Product),size:{x:550,y:550},last:Last,skew:Skew,wrap:Wrap,name:Ridge[i]+"_"+Product});
Google.addOverlay(Radar[i]);
}
Feed();
Loop();
}
function Free()
{
GUnload();
}
</script>
</head>
<body onload="Load();" onunload="Free();">
<?php
############################################################################
include("header.php");
############################################################################
include("menubar.php");
############################################################################
?>
<div id="main-copy">
<br/>
<div align="center">
<span style="font-size:18px; color:#000000; font-weight:bold;">NWS Area Nexrad Radar Image</span>
<br/><br/><br/>
<div style="border: 1px solid #036;" id="google" align="center"></div>
<div id="helper" align="center"></div>
<br/>
<div style="border: 1px solid #036;" align="center">
<div>
<input type="radio" name="pause" onclick="Pause( 5);"/> Extra Fast
<input type="radio" name="pause" onclick="Pause( 8);"/> Fast
<input type="radio" name="pause" onclick="Pause(12);"/> Medium
<input type="radio" name="pause" onclick="Pause(18);"/> Slow
<input type="radio" name="pause" onclick="Pause(25);"/> Extra Slow
<input type="radio" name="pause" onclick="Pause( 2000);"/> Pause
</div>
<div>Opacity
<input type="radio" name="opacity" onclick="Opacity(0.25);"/> 25%
<input type="radio" name="opacity" onclick="Opacity(0.50);"/> 50%
<input type="radio" name="opacity" onclick="Opacity(0.75);"/> 75%
<input type="radio" name="opacity" onclick="Opacity(1.00);"/> 100%
</div>
</div>
<br/><br/>
<script type="text/javascript"><!--
google_ad_client = "pub-2015801794975764";
/* 468x60, created 9/14/08 */
google_ad_slot = "9969387125";
google_ad_width = 468;
google_ad_height = 60;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
<br/><br/>
<table width="80%">
<tr><td align="center">
<!-- SiteSearch Google -->
<form method="get" action="http://www.eldoradocountyweather.com/googlesearch.html" target="_top">
<table border="0" bgcolor="#ffffff">
<tr><td nowrap="nowrap" valign="top" align="left" height="32">
<a href="http://www.google.com/">
<img src="http://www.google.com/logos/Logo_25wht.gif" border="0" alt="Google" align="middle"></img></a>
<br/>
<input type="hidden" name="domains" value="www.eldoradocountyweather.com"></input>
<label for="sbi" style="display: none">Enter your search terms</label>
<input type="text" name="q" size="32" maxlength="255" value="" id="sbi"></input>
<label for="sbb" style="display: none">Submit search form</label>
<input type="submit" name="sa" value="Search" id="sbb"></input>
</td></tr>
<tr>
<td nowrap="nowrap">
<table>
<tr>
<td>
<input type="radio" name="sitesearch" value="" checked="checked" id="ss0"></input>
<label for="ss0" title="Search the Web"><font size="-1" color="#000000">Web</font></label></td>
<td>
<input type="radio" name="sitesearch" value="www.eldoradocountyweather.com" id="ss1"></input>
<label for="ss1" title="Search www.eldoradocountyweather.com"><font size="-1" color="#000000">eldoradocountyweather.com</font></label></td>
</tr>
</table>
<input type="hidden" name="client" value="pub-2015801794975764"></input>
<input type="hidden" name="forid" value="1"></input>
<input type="hidden" name="ie" value="ISO-8859-1"></input>
<input type="hidden" name="oe" value="ISO-8859-1"></input>
<input type="hidden" name="safe" value="active"></input>
<input type="hidden" name="cof" value="GALT:#008000;GL:1;DIV:#336699;VLC:663399;AH:center;BGC:FFFFFF;LBGC:336699;ALC:0000FF;LC:0000FF;T:000000;GFNT:0000FF;GIMP:0000FF;FORID:11"></input>
<input type="hidden" name="hl" value="en"></input>
</td></tr></table>
</form>
<!-- End SiteSearch Google -->
</td></tr></table>
<br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/>
<br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/>
</div>
</div>
<!-- end main-copy -->
<?php
############################################################################
include("footer.php");
############################################################################
# End of Page
############################################################################
?>
-
Thanks Danny!
Will get this sorted out and up in the AM pronto!
Regards,
Wayne
-
I think it's easier to simply use the PHP include statement and use your ridge.html file. I did mine that way <?php include("ridge.html"); ?> and it works, you can see my page at http://stetsonweather.com/wxnradar.php (http://stetsonweather.com/wxnradar.php).
Todd
-
That is what I am looking for basically.Making the image line up with the rest of the page. I just renamed my ridge file to the php extension for ease I guess. But I will plug in the code you suggested and see what it renders.
Thanks so much!!!!!
Wayne
-
Well for some silly reason I haven't figured out yet I get the following Parse error: syntax error, unexpected '<' in /home/kg4muc/public_html/wxridge.php on line 47 when using this code <?php include("ridge.php"); ?> Still hacking!
Thanks!
Wayne
-
You should put the page back to html (ridge.html), then include it in the PHP page. I think that will work better.
Todd
-
Thanks! Just done that here http://www.smythweather.net/wxridge.php
I just can't seem to get the image to line up beside the sidebar in my template like it's supposed to!
I gotta be missing something simple LOL!
Thanks!
Wayne
UPDATE
Problem has been isolated and corrected!
A review of the code Danny sent earlier today
showed that with some modifications for my situation
all should be well. After plugging in the code
everything is as it should be now.
Thanks for ALL the help and suggestions!
-
Sometimes i had an error message "stack overflow at line:0"
what should i do
-
Sometimes i had an error message "stack overflow at line:0"
what should i do
Are you on a Windows or Linux web server?
Stacks are reserved memory that programs use to process hardware events. A stack overflow occurs when there is not enough space in memory to run the hardware interrupt routines.
-
Working my way around the country... added 4 new areas from Ohio to Minnesota today. Messed up my menu in the process but all is well now!
Ohio Regional - http://www.daculaweather.com/ridge_ohio_regional_master.php (http://www.daculaweather.com/ridge_ohio_regional_master.php)
Michigan Regional - http://www.daculaweather.com/ridge_michigan_regional_master.php (http://www.daculaweather.com/ridge_michigan_regional_master.php)
Illinios Region - http://www.daculaweather.com/ridge_illinois_regional_master.php (http://www.daculaweather.com/ridge_illinois_regional_master.php)
Minnesota Region - http://www.daculaweather.com/ridge_minn_regional_master.php (http://www.daculaweather.com/ridge_minn_regional_master.php)
I'm also going to add a map with hotspots that will show the approximate areas covered by each map. Sort of like this:
(http://www.daculaweather.com/stuff/usmap.jpg)
-
Danny, I'm assuming this section controls the default opacity? What what value would I use and where would I set it to make it 50%?
function Opacity(opacity)
{
for (var i=0;Ridge[i];i++)
{
Radar[i].opacity(opacity);
}
Thanks!
-
Sorry I didn't get back to you sooner. As you know I deleted my old Gentoo OS and have been working on recompiling from source my new Gentoo Linux OS. It was due to be replaced. Until that was done, I had no OS...
Wrong spot in the code Steve. Here is what you can do..
It resides in radar.js
Here is where you need to change it:
FrameAnimationLayerOverlay.prototype.opacity=function(filter)
{
this.filter=filter;
if (document.all)
{
this.div.style.filter="alpha(opacity=100)";
if ((this.filter>0)*(this.filter<1))
{
this.div.filters.alpha.opacity=Math.round(this.filter*100);
this.div.filters.alpha.enabled=1;
}
else
{
this.div.filters.alpha.opacity=100;
this.div.filters.alpha.enabled=0;
}
}
else
{
if ((this.filter>0)*(this.filter<1))
{
this.div.style.opacity=this.filter;
}
else
{
this.div.style.opacity=1;
}
}
}
I nabbed this particular code from Google Groups http://www.mail-archive.com/google-maps-api@googlegroups.com/msg11300.html (http://www.mail-archive.com/google-maps-api@googlegroups.com/msg11300.html)
It should help guide you in how you can tweak it..
For the overall image transparency you can also play with a style tag for ridge.html below:
<style type="text/css">
.overlay{
filter:alpha(opacity=60);
-moz-opacity: 0.6;
opacity: 0.6;
}
</style>
-
Good stuff Danny! How the regen go? Looks like you're working anyway!
-
I keep adding more Google maps. I have 17 areas covered now. I've covered everything east of the Mississippi River, from Arkansas to Minnesota and from there to Washington. There are still plenty more to come! :-)
I'm guessing there will be maybe 25-35 before it's all done. I did a larger southeast map that includes 25 radar sites. On my Comcast connection it took about 15 seconds to fully load all images and start looping.
http://www.daculaweather.com/ridge_southeast_master.php (http://www.daculaweather.com/ridge_southeast_master.php)
-
Evening folks,
First off, great script!!!! Have it running here: http://sacrey.info/wxgoogleradar.php (http://sacrey.info/wxgoogleradar.php)
Everytime I look at the page it tells me I need a new key for the API. I have tried 3 different keys with no success. Any ideas? Also how do I get rid of the radar sites being listed below the map?
Thanks, John Sacrey
-
I keep adding more Google maps. I have 17 areas covered now. I've covered everything east of the Mississippi River, from Arkansas to Minnesota and from there to Washington. There are still plenty more to come! :-)
I'm guessing there will be maybe 25-35 before it's all done. I did a larger southeast map that includes 25 radar sites. On my Comcast connection it took about 15 seconds to fully load all images and start looping.
http://www.daculaweather.com/ridge_southeast_master.php (http://www.daculaweather.com/ridge_southeast_master.php)
Looks really good Steve! Very nicely done as usual...
-
Evening folks,
First off, great script!!!! Have it running here: http://sacrey.info/wxgoogleradar.php (http://sacrey.info/wxgoogleradar.php)
Everytime I look at the page it tells me I need a new key for the API. I have tried 3 different keys with no success. Any ideas? Also how do I get rid of the radar sites being listed below the map?
Thanks, John Sacrey
Hi John,
I'm glad you like the script, I enjoyed piecing it together. To remove the output that displays the image URLs cycling through, you need to completely remove this part of your html code.
<div id="helper"></div>
I am not completely sure why you are having the Google Key problem. Usually when there is a key issue you will get the error message and the map will not show up at all.
I can't tell exactly what's going on without your source code, but I would give this a try. Remove the script tag with the Google key number from ridge.html and place it between the "head" tags of wxgoogleradar.php. wxgoogleradar.php appears to be calling ridge.html as a php include?
Script code to remove from ridge.html and put between the head tags in wxgoogleradar.php:
<script src="http://maps.google.com/maps?file=api&v=2&key=ABQIAAAAa4YAlOz8RH5ckQxn5Cm1zBTo8224LVz9aVaZCQBsUVsN5MgkIxTkTgZXkghDOkxfK_ceDqvm7TV6mQ" type="text/javascript">
</script>
Hopefully it will now work with your key...
-
Hi Danny,
Had to redo my membership this morning. I tried changing my email address on my old one, but that did not work. No big deal.
Anyway on the radar page, I tried your suggestions and neither one worked , unfortunately. Changing the place of the key made no difference and when I remove the "div id=helper", I get a map, but no radars. I'll attach a copy of my ridge.html for you to look at.
Thanks for the help,
John Sacrey
-
Hi Danny,
Had to redo my membership this morning. I tried changing my email address on my old one, but that did not work. No big deal.
Anyway on the radar page, I tried your suggestions and neither one worked , unfortunately. Changing the place of the key made no difference and when I remove the "div id=helper", I get a map, but no radars. I'll attach a copy of my ridge.html for you to look at.
Thanks for the help,
John Sacrey
John,
I installed your code into my web server and made just 2 changes. In wxgoogleradar.php I changed the php include path to point to the copy of your ridge.html residing on my server, and I changed the Google key number to my key number. It ran perfectly with no errors.
I'm not exactly sure why your Google Key is not working but I have my suspicions. You are using an invalid key number, but it is giving you the key number error and then it displays normally which is a bit bizarre. When you went to Google to get a new key, did you get the Google key for the main domain or sub domain? Do you own the domain or do you use the sub domain for your entire weather site? IF the main domain has already been issued a key number you would need to use that. For those that run sub domains with Google maps, they would need to take out a Google key for the main domain which will also be valid with any sub domains.
I changed the code in ridge.html so it wouldn't output the image urls under the map. Here is a new copy of ridge.html:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<script src="http://sacrey.info/lzk/radar.js"></script>
<script src="http://sacrey.info/lzk/ridge.js"></script>
<script>
var Clock ;
var Cycle ;
var Google;
var Helper;
var Last= 0;
var Skew= 0;
var Wrap= 10;
var Idle=100;
var Back=500;
var Radar=[];
var Ridge=["LZK","SRX","NQA","SHV","SGF"];
var Product="N0R";
function Pause(pause)
{
Idle=pause*10;
Back=pause*50;
}
function Opacity(opacity)
{
for (var i=0;Ridge[i];i++)
{
Radar[i].opacity(opacity);
}
}
function Loop()
{
for (var i=0;Ridge[i];i++)
{
Helper.childNodes[i].childNodes[0].data=Radar[i].select(Last);
}
Last=(Last+1)%Wrap;
Clock=clearTimeout(Clock);
Clock=setTimeout("Loop()",Last ? Idle : Back);
}
function Feed()
{
var stub="http://www.srh.noaa.gov/ridge2/JSON_generator.php?callback=CallBack&frames="+Wrap;
for (var i=0;Ridge[i];i++)
{
Radar[i].feed(stub+"&rid="+Ridge[i]+"&product="+Product);
}
Cycle=clearTimeout(Cycle);
Cycle=setTimeout("Feed()",150000);
}
function CallBack(callback)
{
var stub="http://www.srh.noaa.gov/";
var pair;
var reload=[];
for (var i=0;callback.directory[i];i++)
{
pair=callback.directory[i].match(/([A-Z][A-Z][A-Z]|[A-Z][0-9][A-Z])/g);
reload[i]=stub+callback.directory[i];
}
for (var i=0;Ridge[i];i++)
{
if (pair) if (pair[0]==Product) if (pair[1]==Ridge[i]) Radar[i].reload(reload);
}
}
function Load()
{
Google=document.getElementById("google");
Google.style.width ="640px";
Google.style.height="640px";
GDraggableObject.setDraggableCursor("pointer");
GDraggableObject.setDraggingCursor ("pointer");
Google=new GMap2(Google);
Google.setCenter (new GLatLng(34.832,-92.258),7, G_PHYSICAL_MAP);
Google.setUIToDefault();
Helper=document.getElementById("helper");
for (var i=0;Ridge[i];i++)
{
Helper.appendChild(document.createElement("DIV"));
Helper.childNodes[i].appendChild(document.createElement("a"));
Radar[i]=new FrameAnimationLayerOverlay({bbox:BBox(Ridge[i],Product),size:
{x:640,y:640},last:Last,skew:Skew,wrap:Wrap,name:Ridge[i]+"_"+Product});
Google.addOverlay(Radar[i]);
}
Feed();
Loop();
var point = new GLatLng(34.63494,-92.55683);
var marker = new GMarker(point, {draggable: false,
title:"Salem" });
GEvent.addListener(marker, "click", function() {
marker.openInfoWindowHtml("Sacrey Weather");
});
Google.addOverlay(marker);
}
function Free()
{
GUnload();
}
</script>
</head>
<body onload="Load();" onunload="Free();">
<br/><br/><br/>
<div style="font-family:arial; font-size:13px; font-weight:normal;" align="center">
<div id="google"></div>
<div id="helper"></div>
<div>
<input type="radio" name="pause" onclick="Pause( 5);"> Extra Fast
<input type="radio" name="pause" onclick="Pause( 8);"> Fast
<input type="radio" name="pause" onclick="Pause(12);"> Medium
<input type="radio" name="pause" onclick="Pause(18);"> Slow
<input type="radio" name="pause" onclick="Pause(25);"> Extra Slow
<input type="radio" name="pause" onclick="Pause( 2000);"> Pause
</div>
<div>Opacity
<input type="radio" name="opacity" onclick="Opacity(0.25);"> 25%
<input type="radio" name="opacity" onclick="Opacity(0.50);"> 50%
<input type="radio" name="opacity" onclick="Opacity(0.75);"> 75%
<input type="radio" name="opacity" onclick="Opacity(1.00);"> 100%
</div>
</div>
</body>
</html>
-
Yes, I hid mine but you can't get rid of that <div>.
I made the helper div hidden (visibility: hidden) and 1px in height. Seems like I had to give it a height value even though it's hidden. I'm not where I can play with it right now to tell.
-
Danny,
It worked!!!!! Thank you very much!!!! On the key, what I did was assign it to the page itself instead of the domain. Duh!!! :oops:
Thank you again and if there is anything on my site you would like a copy of, please ask.
Have a good Labor Day weekend,
John Sacrey
-
Danny,
I am trying to get this working in HTML and on my intranet. No external web server just my own at home. I followed your instructions but cannot get the radar to over-lay the map. I was supprised that Google would give me the api on a private IP address but it works.
I'm sure that I am missing something very rookie, if you wouldn't mind taking a look to stear me in the right directions?
<head>
<title>Google Nexrad Doppler Radar</title>
<meta name="description" content="test" />
<meta name="keywords" content="test" />
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<meta http-equiv="Pragma" content="no-cache" />
<meta http-equiv="Cache-Control" content="no-cache" />
<meta http-equiv="Cache-Control" content="no-store"/>
<meta name="distribution" content="global"/>
<script src="http://maps.google.com/maps?file=api&v=2&sensor=true_or_false&key=ABQIAAAA5uvpvJ9Bxm21XdVeHbEt4xRfWanLLCphprUHhM3Ro32oaDF9qBTSMXrFhTLwkPutwslNRrrNIDsOng" type="text/javascript"></script>
</script>
<script src="http://192.168.1.10/current/misc/google-maps/gsp/radar.js"></script>
<script src="http://192.168.1.10/current/misc/google-maps/gsp/ridge.js"></script>
<script type="text/javascript">
var Clock ;
var Cycle ;
var Google;
var Helper;
var Last= 0;
var Skew= 0;
var Wrap= 10;
var Idle=100;
var Back=500;
var Radar=[];
var Ridge=["GSP"];
var Product=["NCR","RAX"];
function Pause(pause)
{
Idle=pause*10;
Back=pause*50;
}
function Opacity(opacity)
{
for (var i=0;Ridge[i];i++)
{
Radar[i].opacity(opacity);
}
}
function Loop()
{
for (var i=0;Ridge[i];i++)
{
Helper.childNodes[i].childNodes[0].data=Radar[i].select(Last);
}
Last=(Last+1)%Wrap;
Clock=clearTimeout(Clock);
Clock=setTimeout("Loop()",Last ? Idle : Back);
}
function Feed()
{
var stub="http://www.srh.noaa.gov/ridge2/JSON_generator.php?callback=CallBack&frames="+Wrap;
for (var i=0;Ridge[i];i++)
{
Radar[i].feed(stub+"&rid="+Ridge[i]+"&product="+Product);
}
Cycle=clearTimeout(Cycle);
Cycle=setTimeout("Feed()",150000);
}
function CallBack(callback)
{
var stub="http://www.srh.noaa.gov/";
var pair;
var reload=[];
for (var i=0;callback.directory[i];i++)
{
pair=callback.directory[i].match(/([A-Z][A-Z][A-Z]|[A-Z][0-9][A-Z])/g);
reload[i]=stub+callback.directory[i];
}
for (var i=0;Ridge[i];i++)
{
if (pair) if (pair[0]==Product) if (pair[1]==Ridge[i]) Radar[i].reload(reload);
}
}
function Load()
{
Google=document.getElementById("google");
Google.style.width ="640px";
Google.style.height="640px";
GDraggableObject.setDraggableCursor("pointer");
GDraggableObject.setDraggingCursor ("pointer");
Google=new GMap2(Google);
Google.setCenter (new GLatLng(35.273,-80.777),7, G_NORMAL_MAP);
Google.setUIToDefault();
Helper=document.getElementById("helper");
for (var i=0;Ridge[i];i++)
{
Helper.appendChild(document.createElement("DIV"));
Helper.childNodes[i].appendChild(document.createTextNode(""));
Radar[i]=new FrameAnimationLayerOverlay({bbox:BBox(Ridge[i],Product),size:{x:640,y:640},last:Last,skew:Skew,wrap:Wrap,name:Ridge[i]+"_"+Product});
Google.addOverlay(Radar[i]);
}
Feed();
Loop();
}
function Free()
{
GUnload();
}
</script>
</head>
<body onload="Load();" onunload="Free();">
<div style="font-family:arial; font-size:13px; font-weight:normal;" align="center">
<div id="google"></div>
<div id="helper"></div>
<div>
<input type="radio" name="pause" onclick="Pause( 5);"> Extra Fast
<input type="radio" name="pause" onclick="Pause( 8);"> Fast
<input type="radio" name="pause" onclick="Pause(12);"> Medium
<input type="radio" name="pause" onclick="Pause(18);"> Slow
<input type="radio" name="pause" onclick="Pause(25);"> Extra Slow
<input type="radio" name="pause" onclick="Pause( 2000);"> Pause
</div>
<div>Opacity
<input type="radio" name="opacity" onclick="Opacity(0.25);"> 25%
<input type="radio" name="opacity" onclick="Opacity(0.50);"> 50%
<input type="radio" name="opacity" onclick="Opacity(0.75);"> 75%
<input type="radio" name="opacity" onclick="Opacity(1.00);"> 100%
</div>
<br/><br/><br/>
</div>
</body>
</html>
Thanks,
Marshall
-
Danny,
I am trying to get this working in HTML and on my intranet. No external web server just my own at home. I followed your instructions but cannot get the radar to over-lay the map. I was supprised that Google would give me the api on a private IP address but it works.
I'm sure that I am missing something very rookie, if you wouldn't mind taking a look to stear me in the right directions?
Change this line in your ridge.html:
var Product="NCR";
To This:
var Product=["NCR"];
-
Danny,
That didn't quit do it but you updated your sample code so I started over with the updates that you pointed out. That did the trick. I even have about 10 different radars! :-) Thanks and great work. I would love to see some of your other ideas.
Thanks again,
Marshall
-
Time to throw down the gauntlet! :lol:
The bubble on the location flag is nice but...
How would one go about including something like this in the bubble:
<?php
echo "Currently: ". $temperature . $uomTemp . "<br />";
echo $weatherreport . " with " . $dayrn . $uomRain . " rain<br />";
echo $avgspd . $uomWind . " winds from the " . $dirlabel . "<br />";
echo "Pressure: " . $baroinusa2dp . " and " . $pressuretrendname;
?>
Not necessarily that exact code but something to generate that type of text one would have using WD and testtags.
I can't figure out how to cross the server-side|client-side bridge and have NO idea how to use javascript to incorporate any of the testtag values for something like this.
I think it would be a great use of the bubble-text... (sing it with me!) "if I only had a brain".
Any wizards care to tackle this?
Please...?
-
Hi,
I came across this wonderful post for displaying the RADAR feed over google maps.
I have a simple question, is it possible to get the feeds from last 2 hours to current? If so, what do I need to change?
-thanks
Subh
-
I usually dont have this many issues :-(
http://www.cnyweather.com/ridge.html
I generated a google map key, inserted it and says I need to get one.
Oh yeah, and no radar too is showing.
Tony 8-)
-
Time to throw down the gauntlet! :lol:
While this isn't exactly what you're asking for, it may serve your purpose. You could include your weather graphic in the pop-up window. It's pretty easy to do this.
1) In the CSS for the page the radars on, include an entry for the size of the pop-up window (for some reason, Google won't let you have a width smaller than around 250px or so).
.iwContainer { width: 510px; height: 100px; }
2) In the line near the end of the code starting with
marker.openInfoWindowHtml
change it to this:
marker.openInfoWindowHtml('<div class="iwContainer">' + '<img src="http://www.eastmesaweather.com/scripts/wxgraphic/wxgraphic.php?type=banner_big">' + '</div>');
That's all you should need to do.
Steve
-
Danny,
That didn't quit do it but you updated your sample code so I started over with the updates that you pointed out. That did the trick. I even have about 10 different radars! :-) Thanks and great work. I would love to see some of your other ideas.
Thanks again,
Marshall
Hi Marshall,
You are most welcome! I'm glad you got it working the way you wanted..
-
How would one go about including something like this in the bubble:
<?php
echo "Currently: ". $temperature . $uomTemp . "<br />";
echo $weatherreport . " with " . $dayrn . $uomRain . " rain<br />";
echo $avgspd . $uomWind . " winds from the " . $dirlabel . "<br />";
echo "Pressure: " . $baroinusa2dp . " and " . $pressuretrendname;
?>
You could use PHP if you would like to populate the bubble text. You could do an include of testtags.php on the page and put the PHP code inside the quotes in the following line of code:
marker.openInfoWindowHtml("PHP code can go here");
Rough Sample:
http://www.eldoradocountyweather.com/current/misc/google-maps/dax/ridge.html (http://www.eldoradocountyweather.com/current/misc/google-maps/dax/ridge.html)
-
Hi,
I came across this wonderful post for displaying the RADAR feed over google maps.
I have a simple question, is it possible to get the feeds from last 2 hours to current? If so, what do I need to change?
-thanks
Subh
Usually the radar updates about every 10 minutes. That makes for about a 1 hour and 40 minute time span. If you want to extend that time to 2 hours, you would need to change the following two lines:
Change this:
var Wrap= 10;
To this:
var Wrap= 12;
Change this:
var stub="http://www.srh.noaa.gov/ridge2/JSON_generator.php?callback=CallBack&frames="+Wrap;
To this:
var stub="http://www.srh.noaa.gov/ridge2/JSON_generator.php?callback=CallBack&frames="+Wrap;
Doing those 2 changes should give you the 2 hour time span you are looking for. If you wanted to increase the time span even more you would increase the "Wrap=12" number.
-
I usually dont have this many issues :-(
http://www.cnyweather.com/ridge.html
I generated a google map key, inserted it and says I need to get one.
Oh yeah, and no radar too is showing.
Tony 8-)
Hi Tony,
It looks like you have a colon that needs to be removed from your key number. It doesn't look like it's part of the alpha/numeric key. I'm pretty sure it should start with "ABQI". It's in the first character position - key=:ABQIAAAAC5-muwYSiN-yada-yada-yada
Something else I should ask, when you got your key number from Google did you get it for your main index page, which in your case is: http://www.cnyweather.com (http://www.cnyweather.com)?
-
How would one go about including something like this in the bubble:
<?php
echo "Currently: ". $temperature . $uomTemp . "<br />";
echo $weatherreport . " with " . $dayrn . $uomRain . " rain<br />";
echo $avgspd . $uomWind . " winds from the " . $dirlabel . "<br />";
echo "Pressure: " . $baroinusa2dp . " and " . $pressuretrendname;
?>
You could use PHP if you like to populate the bubble text. You could do an include of testtags.php on the page and put the PHP code inside the quotes in the following line of code:
marker.openInfoWindowHtml("PHP code can go here");
Rough Sample:
http://www.eldoradocountyweather.com/current/misc/google-maps/dax/ridge.html (http://www.eldoradocountyweather.com/current/misc/google-maps/dax/ridge.html)
That's exactly what I've been doing and I get no bubble.
Could you post that line from the sample page that you were kind enough to post?
-
How would one go about including something like this in the bubble:
<?php
echo "Currently: ". $temperature . $uomTemp . "<br />";
echo $weatherreport . " with " . $dayrn . $uomRain . " rain<br />";
echo $avgspd . $uomWind . " winds from the " . $dirlabel . "<br />";
echo "Pressure: " . $baroinusa2dp . " and " . $pressuretrendname;
?>
You could use PHP if you would like to populate the bubble text. You could do an include of testtags.php on the page and put the PHP code inside the quotes in the following line of code:
marker.openInfoWindowHtml("PHP code can go here");
Rough Sample:
http://www.eldoradocountyweather.com/current/misc/google-maps/dax/ridge.html (http://www.eldoradocountyweather.com/current/misc/google-maps/dax/ridge.html)
That's exactly what I've been doing and I get no bubble.
Could you post that line from the sample page that you were kind enough to post?
You were on the right track! The code I used is very similar to yours, I just formatted it a wee bit differently by using snippets of code instead of formal code within one php tag.
marker.openInfoWindowHtml("Some Weather Station<br/>Updated: <?php echo $date; ?> at <?php echo $time; ?><br/><br/>Temperature: <?php echo $temperature; ?>°F<br/>Pressure: <?php echo $baroinusa2dp; ?><br/>Rain Today: <?php echo $dayrn; ?>in<br/>Humidity: <?php echo $humidity; ?>%<br/>Dew Pt: <?php echo $dewpt; ?>°F");
});
-
Hi Tony,
It looks like you have a colon that needs to be removed from your key number. It doesn't look like it's part of the alpha/numeric key. I'm pretty sure it should start with "ABQI". It's in the first character position - key=:ABQIAAAAC5-muwYSiN-yada-yada-yada
Something else I should ask, when you got your key number from Google did you get it for your main index page, which in your case is: http://www.cnyweather.com (http://www.cnyweather.com)?
When I got the key, Google suggested http://cnyweather.com so it will work across the whole domain.
<html>
<head>
<script src="http://maps.google.com/maps?file=api&v=2&key=ABQIAAAAC5-muwYSiNYDHsDz9qtQExRIlTTBBjQ8uiJDIE76upo6MuJm-BRTFtEvIOC7Z8Gokfh3ubRDY0X0hA" type="text/javascript">
</script>
<script src="http://www.eldoradocountyweather.com/current/misc/google-maps/tyx/radar.js"></script>
<script src="http://www.eldoradocountyweather.com/current/misc/google-maps/tyx/ridge.js"></script>
<script>
var Clock ;
var Cycle ;
var Google;
var Helper;
var Last= 0;
var Skew= 0;
var Wrap= 10;
var Idle=100;
var Back=500;
var Radar=[];
var Ridge=["TYX"];
var Product="N0R";
function Pause(pause)
{
Idle=pause*10;
Back=pause*50;
}
function Opacity(opacity)
{
for (var i=0;Ridge[i];i++)
{
Radar[i].opacity(opacity);
}
}
function Loop()
{
for (var i=0;Ridge[i];i++)
{
Helper.childNodes[i].childNodes[0].data=Radar[i].select(Last);
}
Last=(Last+1)%Wrap;
Clock=clearTimeout(Clock);
Clock=setTimeout("Loop()",Last ? Idle : Back);
}
function Feed()
{
var stub="http://www.srh.noaa.gov/ridge2/JSON_generator.php?callback=CallBack&frames="+Wrap;
for (var i=0;Ridge[i];i++)
{
Radar[i].feed(stub+"&rid="+Ridge[i]+"&product="+Product);
}
Cycle=clearTimeout(Cycle);
Cycle=setTimeout("Feed()",150000);
}
function CallBack(callback)
{
var stub="http://www.srh.noaa.gov/";
var pair;
var reload=[];
for (var i=0;callback.directory[i];i++)
{
pair=callback.directory[i].match(/([A-Z][A-Z][A-Z]|[A-Z][0-9][A-Z])/g);
reload[i]=stub+callback.directory[i];
}
for (var i=0;Ridge[i];i++)
{
if (pair) if (pair[0]==Product) if (pair[1]==Ridge[i]) Radar[i].reload(reload);
}
}
function Load()
{
Google=document.getElementById("google");
Google.style.width ="640px";
Google.style.height="640px";
GDraggableObject.setDraggableCursor("pointer");
GDraggableObject.setDraggingCursor ("pointer");
Google=new GMap2(Google);
Google.setCenter (new GLatLng(43.751,-75.675),7, G_PHYSICAL_MAP);
Google.setUIToDefault();
Helper=document.getElementById("helper");
for (var i=0;Ridge[i];i++)
{
Helper.appendChild(document.createElement("DIV"));
Helper.childNodes[i].appendChild(document.createElement("a"));
Radar[i]=new FrameAnimationLayerOverlay({bbox:BBox(Ridge[i],Product),size:{x:640,y:640},last:Last,skew:Skew,wrap:Wrap,name:Ridge[i]+"_"+Product});
Google.addOverlay(Radar[i]);
}
Feed();
Loop();
var point = new GLatLng(43.751,--75.675);
var marker = new GMarker(point, {draggable: false,
title:"Your Mouseover Title" });
GEvent.addListener(marker, "click", function() {
marker.openInfoWindowHtml("Name of Your Weather Station");
});
Google.addOverlay(marker);
}
function Free()
{
GUnload();
}
</script>
</head>
<body onload="Load();" onunload="Free();">
<div style="font-family:arial; font-size:13px; font-weight:normal" align="center">
<div id="google"></div>
<div id="helper"></div>
<div>
<input type="radio" name="pause" onclick="Pause( 5);"> Extra Fast
<input type="radio" name="pause" onclick="Pause( 8);"> Fast
<input type="radio" name="pause" onclick="Pause(12);"> Medium
<input type="radio" name="pause" onclick="Pause(18);"> Slow
<input type="radio" name="pause" onclick="Pause(25);"> Extra Slow
<input type="radio" name="pause" onclick="Pause( 2000);"> Pause
</div>
<div>Opacity
<input type="radio" name="opacity" onclick="Opacity(0.25);"> 25%
<input type="radio" name="opacity" onclick="Opacity(0.50);"> 50%
<input type="radio" name="opacity" onclick="Opacity(0.75);"> 75%
<input type="radio" name="opacity" onclick="Opacity(1.00);"> 100%
</div>
</div>
</body>
</html>
Still no go.
-
You were on the right track! The code I used is very similar to yours, I just formatted it a wee bit differently by using snippets of code instead of formal code within one php tag.
Works like a dream... when I use the right page... ](*,) ](*,) ](*,)
When throwing your obviously working snippet in there didn't work for me, I figured it out. I was too quick to blame my lack of exposure to javascript and overlooked the more common error - my "occasional" brain-fart.
Since that "major discovery", it works exactly like I was trying to make it work to begin with - with the info in a small include file.
Honestly, did you [ever] have one of those days that, when you look back at it, you wonder how you managed to even cross the street safely? :oops:
Thanks for your patience & assistance and, of course, the great script!
-
When I got the key, Google suggested http://cnyweather.com so it will work across the whole domain.
Still no go.
The key for your domain should be fine. I looked over your ridge.html document and this is what I found.
Near the very top on the opening "script" tag change it like this:
Change this:
<script>
To this:
<script type="text/javascript">
Further down in the code you have double "negative" signs in front of the last longitude setting. Change it to just 1 "-" sign.
You also need to download the two .js files and upload them to the same folder your ridge.html is in.
Then Change this:
<script src="http://www.eldoradocountyweather.com/current/misc/google-maps/tyx/radar.js"></script>
<script src="http://www.eldoradocountyweather.com/current/misc/google-maps/tyx/ridge.js"></script>
To this:
<script type="text/javascript" src="radar.js"></script>
<script type="text/javascript" src="ridge.js"></script>
You can download the .js script from here temporarily:
http://www.eldoradocountyweather.com/current/misc/google-maps/tyx/radar.js (http://www.eldoradocountyweather.com/current/misc/google-maps/tyx/radar.js)
http://www.eldoradocountyweather.com/current/misc/google-maps/tyx/ridge.js (http://www.eldoradocountyweather.com/current/misc/google-maps/tyx/ridge.js)
I copied your script and ran it on my own site with my key and it worked fine after I made the changes mentioned above. So hopefully this will work for you now. If not we'll get it working..
NOTE: Two of the corrections you needed to make was my fault. I had a 2 errors in the script you copied from the 1st page code which eliminates the URL listing under the map. Is is now corrected..
-
You were on the right track! The code I used is very similar to yours, I just formatted it a wee bit differently by using snippets of code instead of formal code within one php tag.
Works like a dream... when I use the right page... ](*,) ](*,) ](*,)
When throwing your obviously working snippet in there didn't work for me, I figured it out. I was too quick to blame my lack of exposure to javascript and overlooked the more common error - my "occasional" brain-fart.
Since that "major discovery", it works exactly like I was trying to make it work to begin with - with the info in a small include file.
Honestly, did you have one of those days that, when you look back at it, you wonder how you managed to even cross the street safely? :oops:
Thanks for your patience & assistance and, of course, the great script!
Your welcome, I'm very happy to help! Yes your original code was fine and should work just as well once it was edited a little. I'd love to see it when you're done. We ALL have those OFF days. Thank God for the lucid ones.
-
It worked out exactly the way I had first tried it with the include and also with just the code as I originally posted it - it all worked with no edit. I was just stupidly doing it on the wrong page in the wrong folder - the one that had no idea what the heck I was talking about with things like "testtags" #-o :-P
In my feeble defense, I should point out that it's been awhile since I played with that script and I've been distracted by my new Brultech energy monitor toys and the NFL is starting and ... ... nah, I can't even keep a straight face when I offer that explanation... it was just one of these moments when you end up looking like this -> :shock: for no good reason.
I haven't really done anything with it all other than a few RADARs from the area and throwing a style="display:none" in the "Helper DIV" to block the link list. It's still sitting in a "wxsample" page & I don't even have a Google Key for it :oops: . That last Mexican Hurricane had me looking for it tho' and renewed my interest.
-
In my feeble defense, I should point out that it's been awhile since I played with that script and I've been distracted by my new Brultech energy monitor toys and the NFL is starting
Actually I think that is a very valid defense! That Brultech energy monitor looks really cool and compile that with the NFL starting is enough to mess up any red blooded American man.
The great part is you ended up throwing down and running the gauntlet very well indeed & all by yourself! =D> =D> =D>
-
Thanks for the help Danny. Got it all squared away.
Tony 8-)
-
Here is the link to my page. Map looks great just no radar. Could someone give it a look please?
www.leomaweather.com/ridge.html (http://www.leomaweather.com/ridge.html)
Also here is my ridge.html
<html>
<head>
<script src="http://maps.google.com/maps?file=api&v=2&key=ABQIAAAA2d61DKlt_zPZ7z1UxYtIEhR2Io5lMBT2HxNA_qjBqSu9kZXIYRRhObCEo4YuqEtngq2Z6D1JYK8BIg" type="text/javascript">
</script>
<script type="text/javascript" src="radar.js"></script>
<script type="text/javascript" src="ridge.js"></script>
<script type="text/javascript">
var Clock ;
var Cycle ;
var Google;
var Helper;
var Last= 0;
var Skew= 0;
var Wrap= 10;
var Idle=100;
var Back=500;
var Radar=[];
var Ridge=["0HX"];
var Product=["NCR"];
function Pause(pause)
{
Idle=pause*10;
Back=pause*50;
}
function Opacity(opacity)
{
for (var i=0;Ridge;i++)
{
Radar.opacity(opacity);
}
}
function Loop()
{
for (var i=0;Ridge;i++)
{
Helper.childNodes.childNodes[0].data=Radar.select(Last);
}
Last=(Last+1)%Wrap;
Clock=clearTimeout(Clock);
Clock=setTimeout("Loop()",Last ? Idle : Back);
}
function Feed()
{
var stub="http://www.srh.noaa.gov/ridge2/JSON_generator.php?callback=CallBack&frames="+Wrap;
for (var i=0;Ridge;i++)
{
Radar.feed(stub+"&rid="+Ridge+"&product="+Product);
}
Cycle=clearTimeout(Cycle);
Cycle=setTimeout("Feed()",150000);
}
function CallBack(callback)
{
var stub="http://www.srh.noaa.gov/";
var pair;
var reload=[];
for (var i=0;callback.directory;i++)
{
pair=callback.directory.match(/([A-Z][A-Z][A-Z]|[A-Z][0-9][A-Z])/g);
reload=stub+callback.directory;
}
for (var i=0;Ridge;i++)
{
if (pair) if (pair[0]==Product) if (pair[1]==Ridge) Radar.reload(reload);
}
}
function Load()
{
Google=document.getElementById("google");
Google.style.width ="700px";
Google.style.height="640px";
GDraggableObject.setDraggableCursor("pointer");
GDraggableObject.setDraggingCursor ("pointer");
Google=new GMap2(Google);
Google.setCenter (new GLatLng(36.243,-86.559),7, G_PHYSICAL_MAP);
Google.setUIToDefault();
Helper=document.getElementById("helper");
for (var i=0;Ridge;i++)
{
Helper.appendChild(document.createElement("DIV"));
Helper.childNodes.appendChild(document.createElement("a"));
Radar=new FrameAnimationLayerOverlay({bbox:BBox(Ridge,Product),size:{x:640,y:700},last:Last,skew:Skew,wrap:Wrap,name:Ridge+"_"+Product});
Google.addOverlay(Radar);
}
Feed();
Loop();
var point = new GLatLng(33.359,-82.562);
var marker = new GMarker(point, {draggable: false,
title:"Your Mouseover Title" });
GEvent.addListener(marker, "click", function() {
marker.openInfoWindowHtml("Leoma Weather");
});
Google.addOverlay(marker);
}
function Free()
{
GUnload();
}
</script>
</head>
<body onload="Load();" onunload="Free();">
<div style="font-family:arial; font-size:13px; font-weight:normal" align="center">
<div id="google"></div>
<div id="helper"></div>
<div>
<input type="radio" name="pause" onclick="Pause( 5);"> Extra Fast
<input type="radio" name="pause" onclick="Pause( 8);"> Fast
<input type="radio" name="pause" onclick="Pause(12);"> Medium
<input type="radio" name="pause" onclick="Pause(18);"> Slow
<input type="radio" name="pause" onclick="Pause(25);"> Extra Slow
<input type="radio" name="pause" onclick="Pause( 2000);"> Pause
</div>
<div>Opacity
<input type="radio" name="opacity" onclick="Opacity(0.25);"> 25%
<input type="radio" name="opacity" onclick="Opacity(0.50);"> 50%
<input type="radio" name="opacity" onclick="Opacity(0.75);"> 75%
<input type="radio" name="opacity" onclick="Opacity(1.00);"> 100%
</div>
</div>
</body>
</html>
-
I don't know if it's been changed since I first d/loaded it a while back but where you have this under your RADAR list:
var Product=["NCR"];
I have this:
var Product="NCR";
It's been so long, I might have a "bad" one but it works.
-
Here is the link to my page. Map looks great just no radar. Could someone give it a look please?
www.leomaweather.com/ridge.html (http://www.leomaweather.com/ridge.html)
You have duplicate code in radar.js and ridge.js. Your code in ridge.js correct
Paste this into your radar.js file:
function FrameAnimationLayerOverlay(obj)
{
this.bbox=obj.bbox ? obj.bbox : {};
this.size=obj.size ? obj.size : {};
this.last=obj.last ? obj.last : 0;
this.skew=obj.skew ? obj.skew : 0;
this.wrap=obj.wrap ? obj.wrap : 10;
this.name=obj.name ? obj.name : "";
this.filter=1;
this.adjust=1;
}
FrameAnimationLayerOverlay.prototype=new GOverlay();
FrameAnimationLayerOverlay.prototype.initialize=function(set)
{
this.set=set;
this.div=document.createElement("DIV");
this.div.style.position="absolute";
this.set.getPane(G_MAP_MAP_PANE).appendChild(this.div);
for (var i=0;this.wrap-i;i++)
{
var gif=document.createElement("IMG");
gif.style.position="absolute";
gif.style.visibility="hidden";
gif.style.display="none";
gif.style.left ="0px";
gif.style.top ="0px";
gif.style.width =this.adjust ? "100%" : "";
gif.style.height=this.adjust ? "100%" : "";
gif.onload =this.loaded;
gif.onerror=this.failed;
gif.galleryImg="no";
this.div.appendChild(gif);
}
}
FrameAnimationLayerOverlay.prototype.remove=function()
{
for (var i=0;this.wrap-i;i++)
{
var gif=this.div.childNodes[this.wrap-i-1];
this.div.removeChild(gif);
}
this.set.getPane(G_MAP_MAP_PANE).removeChild(this.div);
}
FrameAnimationLayerOverlay.prototype.redraw=function(repair)
{
if (!repair) return
var z0=this.set.fromLatLngToDivPixel(new GLatLng(this.bbox.y0,this.bbox.x0));
var z1=this.set.fromLatLngToDivPixel(new GLatLng(this.bbox.y1,this.bbox.x1));
if (this.adjust)
{
this.div.style.left =Math.min(z1.x,z0.x)+"px";
this.div.style.top =Math.min(z1.y,z0.y)+"px";
this.div.style.width =Math.abs(z1.x-z0.x)+"px";
this.div.style.height=Math.abs(z1.y-z0.y)+"px";
}
else
{
this.div.style.left =(z1.x+z0.x-this.size.x)>>1+"px";
this.div.style.top =(z1.y+z0.y-this.size.y)>>1+"px";
this.div.style.width =this.size.x+"px";
this.div.style.height=this.size.y+"px";
}
}
FrameAnimationLayerOverlay.prototype.copy=function()
{
return new FrameAnimationLayerOverlay({bbox:this.bbox,size:this.size,last:this.last,skew:this.skew,wrap:this.wrap,name:this.name});
}
FrameAnimationLayerOverlay.prototype.loaded=function(gif)
{
gif=window.event ? window.event.srcElement : gif.currentTarget;
gif.style.display="";
gif.loaded=1;
gif.failed=0;
}
FrameAnimationLayerOverlay.prototype.failed=function(gif)
{
gif=window.event ? window.event.srcElement : gif.currentTarget;
if (!gif.failed) gif.src=gif.src;
gif.style.display="none";
gif.loaded=0;
gif.failed=1;
}
FrameAnimationLayerOverlay.prototype.hide=function()
{
this.div.style.visibility="hidden";
}
FrameAnimationLayerOverlay.prototype.show=function()
{
this.div.style.visibility="";
}
FrameAnimationLayerOverlay.prototype.opacity=function(filter)
{
this.filter=filter;
if (document.all)
{
this.div.style.filter="alpha(opacity=100)";
if ((this.filter>0)*(this.filter<1))
{
this.div.filters.alpha.opacity=Math.round(this.filter*100);
this.div.filters.alpha.enabled=1;
}
else
{
this.div.filters.alpha.opacity=100;
this.div.filters.alpha.enabled=0;
}
}
else
{
if ((this.filter>0)*(this.filter<1))
{
this.div.style.opacity=this.filter;
}
else
{
this.div.style.opacity=1;
}
}
}
FrameAnimationLayerOverlay.prototype.rescale=function(adjust)
{
this.adjust=adjust;
for (var i=0;this.wrap-i;i++)
{
var gif=this.div.childNodes[i];
gif.style.left ="0px";
gif.style.top ="0px";
gif.style.width =this.adjust ? "100%" : "";
gif.style.height=this.adjust ? "100%" : "";
}
this.redraw(true);
}
FrameAnimationLayerOverlay.prototype.select=function(offset)
{
offset=(this.skew+offset)%this.wrap;
var gif=this.div.childNodes[offset];
if (gif.loaded) this.div.childNodes[this.last].style.visibility="hidden";
if (gif.loaded) this.last=offset;
if (gif.loaded) this.div.childNodes[this.last].style.visibility="";
return this.div.childNodes[this.last].src;
}
FrameAnimationLayerOverlay.prototype.feed=function(recall)
{
var div=document.getElementById("("+this.name+")");
if (div) document.body.removeChild(div);
div=document.createElement("SCRIPT");
if (div) document.body.appendChild(div);
div.src=recall+"&random="+(""+Math.random().toFixed(10)+"").slice(-10);
div.id="("+this.name+")";
}
FrameAnimationLayerOverlay.prototype.reload=function(recall)
{
var gif,src;
var set=[0,0];
for (var i=0;recall[i];i++)
{
src=recall[i];
if (gif=this.div.childNodes[(this.skew+i+0)%this.wrap]) set[0]+=gif.loaded*(gif.src==src);
if (gif=this.div.childNodes[(this.skew+i+1)%this.wrap]) set[1]+=gif.loaded*(gif.src==src);
}
if ((set[0]==(i-0))*(set[1]==0))
{
return;
}
if ((set[0]==0)*(set[1]==(i-1)))
{
gif=this.div.childNodes[(this.skew+0)%this.wrap];
this.skew=(this.skew+1)%this.wrap;
// this.div.removeChild(gif);
// this.div.appendChild(gif);
gif.style.display="none";
gif.loaded=0;
gif.failed=0;
gif.src=src;
return;
}
for (var i=0;recall[i];i++)
{
src=recall[i];
gif=this.div.childNodes[(this.skew+i)%this.wrap];
gif.style.display="none";
gif.loaded=0;
gif.failed=0;
gif.src=src;
}
}
-
Thanks!!! I forgot to look at those files. I figured I messed up somewhere in the html file. Thanks again.
-
Great Script was able to get working in no time, but is there away to add warnings?
-
Great Script was able to get working in no time, but is there away to add warnings?
I'm glad you like the script and got it working so easily. You are welcome to use and develop this script in any way you wish.
-
Got the bubble with current conditions working. http://www.daculaweather.com/ridge_georgia_master.php
Nice little feature!
-
Got the bubble with current conditions working. http://www.daculaweather.com/ridge_georgia_master.php
Nice little feature!
Lookin' good Steve, nicely done.
Are you getting the data from, WD and testtags.php or VWS?
-
Thanks. WD.
-
Is there a way to pull this from VWS? What file would I use?
Jay
-
I'll play with that when I get home this afternoon, but in short, yes, you should be able to. The part I don't know about yet is the inclusion of " in the script. Any formatting beyond the very basic stuff that doesn't use quotes might not work since the script uses quotes to enclose the string of fields from WD.
I will create a page that loads the AJAX script and attempt to use the VWS tags in place of the WD tags.
-
Thanks, Steve. I do have AJAX updating my site if that helps.
Jay
-
Your welcome, I'm very happy to help! Yes your original code was fine and should work just as well once it was edited a little. I'd love to see it when you're done. We ALL have those OFF days. Thank God for the lucid ones.
Well, I got around to getting a KEY and I finally found a little more time for the bubble and, being it was a weather day I thought it a good time to try and finish my "vision". Almost done:
(http://www.lascruces-weather.com/pics/ridgepopup.gif)
If there are any advisories, it starts with the bubble "open" If not, it's "closed". Same with the "graphicast" presence on the page bottom.
Right now, the advisory colors match those found in the atom-advisory.php list.
If it's raining, the rain rate will be included and gusts will display with the wind over 0 mph.
I posted a screen cap to show the advisory and because I don't know how well it works without one yet! :lol: Only kidding. The wind and rain details work fine and I haven't had anything other than a "Watch" going on today.
It's just slopped into a wxsample type page so I can find it easily and I haven't worried about any lack of validation yet.
http://www.lascruces-weather.com/wxridge2.php (http://www.lascruces-weather.com/wxridge.php)
-
Very nice. How did you make it start with the bubble open on alarms?
-
Thanks Steve!
What I did was to drop this in after the event listener:
<?php if ($NOAAEvent !== 'NO CURRENT ADVISORIES') {?>
marker.openInfoWindowHtml(" <?php include("ridge_bubble2.php"); ?> ");
<?php } ?>
In the marker area, it would look like this between the listener function closers and the "next line":
GEvent.addListener(marker, "click", function() {
marker.openInfoWindowHtml(" <?php include("ridge_bubble2.php"); ?> "
);
});
<?php if ($NOAAEvent !== 'NO CURRENT ADVISORIES') {?>
marker.openInfoWindowHtml(" <?php include("ridge_bubble2.php"); ?> ");
<?php } ?>
Google.addOverlay(marker);
Needless to say (but I will anyway :-P), the php include is for my file with "the stuff" in it to be displayed.
It just puts a condition test outside of the event listener and opens the balloon if condition met. I'm assuming it works by just juggling the condition test and getting the desired results in either case.
I'm still linking to an older page so it doesn't function just yet on the "real" link.
-
Hi,
Can anyone point me to any website showing animated RADAR/SATELLITE weather forecast for Brazil?
Something like this would be very useful, but not sure how they are using it.
http://www.wunderground.com/wundermap/?lat=-22.89999962&lon=-43.16999817&zoom=8&pin=Rio%20De%20Janeiro%2c%20Brazil&type=hyb&rad=0&wxsn=0&svr=0&cams=0&sat=1&sat.num=1&sat.spd=25&sat.opa=85&sat.gtt1=109&sat.gtt2=108&sat.type=VIS&riv=0&mm=0&hur=0
Thanks,
subh
-
Danny? :grin:
-
Hi,
Can anyone point me to any website showing animated RADAR/SATELLITE weather forecast for Brazil?
Something like this would be very useful, but not sure how they are using it.
http://www.wunderground.com/wundermap/?lat=-22.89999962&lon=-43.16999817&zoom=8&pin=Rio%20De%20Janeiro%2c%20Brazil&type=hyb&rad=0&wxsn=0&svr=0&cams=0&sat=1&sat.num=1&sat.spd=25&sat.opa=85&sat.gtt1=109&sat.gtt2=108&sat.type=VIS&riv=0&mm=0&hur=0
Thanks,
subh
Hi subh,
From what I have found, South America including Brazil have fairly spotty radar coverage. Brazil has some radar coverage in the Sao Paulo area from near Joinville to Rio De Janeiro running a few hundred miles inland. Also in the extreme south in the central and western area of the state of Rio Grande do Sul..
Here is the main Brazil radar page: http://www.redemet.aer.mil.br/radar/radar.php?ID_REDEMET=89911f843ef2e1c69d0273889005ad24 (http://www.redemet.aer.mil.br/radar/radar.php?ID_REDEMET=89911f843ef2e1c69d0273889005ad24)
I think the Wunderground Map you provided is a bit incomplete compared to other areas of the world, but I am sure they will catch up eventually.
Unfortunately there are few places in the world that have radar and satellite coverage as good as the United States and it is free for anyone to use in the Land of the Free. The National Weather Service also gives you full access to most of their data bases (for those that know where to look), making it much easier to make radar script like what is in this thread, unlike most places in the world.
I don't know if this is what you are looking for, but on my weather site I have South America city forecasts for all of South America including 364, 7 day forecasts for cities in brazil, satellite coverage, current weather conditions and climate data for 180 different cities in Brazil. I am planning to extend my South America coverage going forward including SOME radar. Below I have posted some brazil links you might be interested in.
Forecast for cities Brazil: http://www.eldoradocountyweather.com/forecast/brazil/brazil-city-forecast-listings-a-c.html (http://www.eldoradocountyweather.com/forecast/brazil/brazil-city-forecast-listings-a-c.html)
Climate: http://www.eldoradocountyweather.com/climate/brazil/brazil-city-climate-listings-a-z.html (http://www.eldoradocountyweather.com/climate/brazil/brazil-city-climate-listings-a-z.html)
Current Conditions Temperature: http://www.eldoradocountyweather.com/forecast/southamerica/southamericatemps.html (http://www.eldoradocountyweather.com/forecast/southamerica/southamericatemps.html)
Current Conditions Dew Point: http://www.eldoradocountyweather.com/forecast/southamerica/southamericadew.html (http://www.eldoradocountyweather.com/forecast/southamerica/southamericadew.html)
Current Conditions Heat Index: http://www.eldoradocountyweather.com/forecast/southamerica/southamericaheat.html (http://www.eldoradocountyweather.com/forecast/southamerica/southamericaheat.html)
Current Conditions Humidity: http://www.eldoradocountyweather.com/forecast/southamerica/southamericahumidity.html (http://www.eldoradocountyweather.com/forecast/southamerica/southamericahumidity.html)
Current Conditions Pressure: http://www.eldoradocountyweather.com/forecast/southamerica/southamericapressure.html (http://www.eldoradocountyweather.com/forecast/southamerica/southamericapressure.html)
Current Conditions Wind Speed: http://www.eldoradocountyweather.com/forecast/southamerica/southamericawindspeed.html (http://www.eldoradocountyweather.com/forecast/southamerica/southamericawindspeed.html)
6 Day Precipitation Forecast: http://www.eldoradocountyweather.com/forecast/world-forecasts/world-day1-rainfall-forecast.html (http://www.eldoradocountyweather.com/forecast/world-forecasts/world-day1-rainfall-forecast.html)
Infra Red Satellite: http://www.eldoradocountyweather.com/current/satellite/south-america-ir-satellite-loop.html (http://www.eldoradocountyweather.com/current/satellite/south-america-ir-satellite-loop.html)
Satellite Visible Satellite: http://www.eldoradocountyweather.com/current/satellite/south-america-vis-satellite-loop.html (http://www.eldoradocountyweather.com/current/satellite/south-america-vis-satellite-loop.html)
Satellite Water Vapor Satellite: http://www.eldoradocountyweather.com/current/satellite/south-america-wv-satellite-loop.html (http://www.eldoradocountyweather.com/current/satellite/south-america-wv-satellite-loop.html)
Color Infra Red Satellite: http://www.eldoradocountyweather.com/satellite/misc/s.america-ir-sat.html (http://www.eldoradocountyweather.com/satellite/misc/s.america-ir-sat.html)
-
I was asked how to preset the default opacity that the map loads up with.
In order to do this you just need to add a short line of code near the bottom of the code section of ridge.html...
This is what needs to be added:
Opacity(0.50);
Here is where you can add it to your code:
Google.addOverlay(Radar[i]);
}
Opacity(0.50);
Feed();
Loop();
}
function Free()
{
GUnload();
}
</script>
A few visual examples of percentages of opacity you can set the map to "load up" with:
Opacity(0.15);
Opacity(0.25);
Opacity(0.33);
Opacity(0.50);
Opacity(0.75);
Opacity(0.88);
Or you can set it to what ever you wish from 0.01 to 0.99
NOTE: These instructions can also be found on the first post of the thread...
-
And the fun continues...
Clicking the marker:
(http://www.lascruces-weather.com/pics/ridge3.gif)
And as before, the first view if any advisories have been issued,
(http://www.lascruces-weather.com/pics/ridgepopup.gif)
-
How about these live updates? http://www.daculaweather.com/ridge_georgia_master.php
-
WOW thats awesome Steve!
-
Thanks Tony! I struggled all morning long trying different things that would work but finally, 5-6 hours later that was the solution.
The link I posted many pages earlier in this topic was wrong in case anyone went to the wrong page.
-
Outstanding Steve! That is definitely 1st class! The image is perfect for that application! Full balance all the way around! =D> =D>
- It timed out once for me showing the "Unable to connect" error but a click refresh cleared it.
I was going to throw the static forecast icons in the 2nd and 3rd tabs but this API has so many little toys in it, it's nothing but fun-filled distractions! :lol:
One of these days, I'll actually work on having the balloon validate! :-P
-
The connection to my site has been a little flaky this afternoon.
But thanks!
-
Thanks Danny for the detailed response for the Brazilian RADAR feed query. I will try to use something like this on my google map application for now.
http://www.eldoradocountyweather.com/satellite/misc/s.america-ir-sat.html
Thanks again.
-Subh
-
Outstanding Steve! That is definitely 1st class! The image is perfect for that application! Full balance all the way around! =D> =D>
One of these days, I'll actually work on having the balloon validate! :-P
Yep, my balloon doesn't validate either. Minor detail! I just finished redoing all my Google Map pages with a new style, now for the rest of the website!
-
My last shot at it validates now that I learned a little bit about Javascript and using getElementById stuff to get the HTML stuff in the bubble. Bit of an adjustment in the mindset between PHP and Javascript.
What I can't get clean is the "&rid=" in the RADAR call. Using & as is in "&product" don't cut it. But I only have 2 warns/2 errors and all from that small detail so I can live with it for now.
I broke the HTML stuff out separately into a "wxnewpage" file and that somehow helped me get a little handle on this "new" Javascript stuff. It's a tough change over from doing everything in PHP - for me, anyway. Thinking in "client-side" perspective just didn't come easy.
-
If the code could be tossed into a file and called from the page, it would take care of the validation issue. But I can live with mine for a while, at least the validation error isn't something that might change the way it looks.
-
Do you mean for the bubble or the RADAR code "&rid="? You guys know all this Javascript stuff so you must mean the "&rid=" thing. And your posted page validates nice & green! That bubble is slick, I have to say again.
The bubble info I call from a file. Once I figured it out a little bit, I put the bubble file's info and other HTML stuff ($currentcondrid) in this:
<div style="display: none" >
<span id="ridcond" ><?php echo $currentcondrid; ?></span>
</div>
and did this in the 'marker' setup to present it:
var cconds = document.getElementById('ridcond');
var marker = new GMarker(point, {draggable: false,
title:"LasCruces-Weather" });
GEvent.addListener(marker, "click", function() {
marker.openInfoWindowTabsHtml( cconds );
I have no idea if it's the proper way to go about it but it works without error and I learned a little something!
As far as the "&rid=" thing - all the RADARs display and it works fine so no biggie for me. I'm pretty sure my problem is a result of me separating the (older) El Dorado code into different sections.
Thanks again to "ElDorado Wx" for a great script - lots of fun playing with it as well!
-
Every time I do this stuff I learn something new! I guess you can teach an old dog new tricks! :-)
I added two new things yesterday, although not related to this map. I added the USA weather extremes to my home page and added the "OnThis Date" weather history script as a page. I'm getting close to finishing my new website makeover, only have about 20 or so pages left to update, including the main page. I think I'm going to redo the home page a little bit so it will probably be last since it's the most complex. I've finally reduced my css code to one file, and separated the menu and footer into separate files for ease of maintenance. I wonder sometimes how smart I was building the entire site from scratch! :-) This is a lot of work!
-
I wonder sometimes how smart I was building the entire site from scratch! :-) This is a lot of work!
Your efforts look excellent though! You have my vote for the next featured website. =D>
-
Thank you very much! It's nice to know that all that work doesn't go unnoticed! Like I said the home page, the About page and and maybe 15-20 other pages haven't been converted yet but hopefully by this weekend most of the pages will be done. It's the last 3 or 4 that will take the longest and of course, that's why put those off till the end!
And along those lines (and I'll add a post somewhere else for this) I've got some modified forecast icons that I'll share if anyone would like them. You can see them in action here ( http://www.daculaweather.com/forecast.php (http://www.daculaweather.com/forecast.php)).
There are two sizes available. The size on my site are the same dimensions as the original images but the actual picture is smaller due to the addition of the drop-shadow. The larger image has the same size picture but the dimensions are larger due to the drop-shadow. Oh yea, the corners are rounded!
http://www.daculaweather.com/stuff/rounded_forecast_icons.zip (http://www.daculaweather.com/stuff/rounded_forecast_icons.zip)
http://www.daculaweather.com/stuff/rounded_forecast_icons_large.zip (http://www.daculaweather.com/stuff/rounded_forecast_icons_large.zip)
-
I've got some modified forecast icons that I'll share if anyone would like them. You can see them in action here ( http://www.daculaweather.com/forecast.php (http://www.daculaweather.com/forecast.php)).
There are two sizes available. The size on my site are the same dimensions as the original images but the actual picture is smaller due to the addition of the drop-shadow. The larger image has the same size picture but the dimensions are larger due to the drop-shadow. Oh yea, the corners are rounded!
http://www.daculaweather.com/stuff/rounded_forecast_icons.zip (http://www.daculaweather.com/stuff/rounded_forecast_icons.zip)
http://www.daculaweather.com/stuff/rounded_forecast_icons_large.zip (http://www.daculaweather.com/stuff/rounded_forecast_icons_large.zip)
Sweet!!! Very Classy! \:D/
-
This project is really taking off! Thought I would add my two cents in with dynamic centering of the map and dynamic loading of radar sites using an airport identifier. This method uses PHP/MySQL to compare coordinates of the airport contained in one database table and calculates the distance to radar sites using their coordinates in another database table. From that calculation it then determines if the sites are within a predetermined range (ex: 300 miles) to create a string of multiple radar sites. The map is then centered on the airport you type in using its coordinates.
Also included in the attached code (Radar.txt) is a script to decode the current METAR from the airport you enter, which I found and modified from http://woody.cowpi.com/phpscripts/ (http://woody.cowpi.com/phpscripts/). The author said the code is free to use, modify, and learn from. A live demo is available on my site at http://www.chriswardmedia.com/weather.php (http://www.chriswardmedia.com/weather.php).
Key columns referenced in Airports Table: ICAO, Lat, Lng
http://chriswardmedia.com/downloads/AirportsDatabase.csv (http://chriswardmedia.com/downloads/AirportsDatabase.csv)
Key columns reference in Radars Table: Name, Lat, Lng
http://chriswardmedia.com/downloads/NWSRadars.csv (http://chriswardmedia.com/downloads/NWSRadars.csv)
Distance Function in Miles:
if((distance($icaolat, $icaolng, $nwslat, $nwslng))<300)
* change 300 miles to whatever you think is appropriate/your setup can handle
Requirement: You will need a host that supports PHP and MySQL, and know how to create databases/import data into MySQL. You will also need to enter your MySQL connection information in the sections with:
$host="My.SqlServer.Com"; // Host name
$username="MyUserName"; // Mysql username
$password="WhateverYourPasswordIs"; // Mysql password
Note: If you enter an identifier for a smaller airport that has METAR data, the coordinates may not available in the airports database. In that case the METAR info will load but the map will fail to load any radars and center at the equator in the Atlantic Ocean (0°,0°). If you enter an airport identifier that doesn't exist...the map won't load any radars and no METAR data will show up (go figure).
-
Very nice Pat!! Great job!
Tom
-
NWS in El Paso has finally got a little bit of the Graficast stuff available like many other cities have. I always thought that was pretty cool and wanted the current graphic on my "Googladar" page so I put together a little script that I run as a CRONjob every hour.
It'll find the first graficast available which, from what I can tell, is usually the current outlook and copy it to my root. If there isn't one (quite often in NWS El Paso), it'll copy the U.S. Weather map. I also have it set to run upon page entry if the $NOAAEvent tag I use in the bubble is not "NO CURRENT ADVISORIES" as NWS usually has something up for any advisory.
The 'epz' and 'elp' pertain to the El Paso NWS and are in the directory names they use. You might need to check their "image info" to see exactly where they are in your zones. It's just a quickie that I'm sure could be cleaned up a bit but I thought I would throw it in here in case it interests anyone (you're on your own :-P). I include the Graficast below the Google RADAR and I found the objective a good enough reason to explore cURL and CRONJobs for the first time :grin: .
http://www.lascruces-weather.com/wxridge5.php (http://www.lascruces-weather.com/wxridge5.php)
cronGraficast.php:
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'http://www.srh.noaa.gov/elp/');
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$file = curl_exec($ch);
curl_close ($ch);
$sortcell = strpos($file,'src="/images/fxc/epz/graphicast/image');
if ($sortcell != ''){
$graficast1 = substr($file,$sortcell+32);
$pos = strpos($graficast1,'"');
$graficast1 = substr($graficast1,0,$pos);
$graficast2 = 'http://www.srh.noaa.gov/images/fxc/epz/graphicast/';
$graficast = $graficast2 . $graficast1;
}
if ($graficast == '' or $sortcell == '')
{$graficast = 'http://www.hpc.ncep.noaa.gov/noaa/noaa.gif';}
$ch = curl_init($graficast);
$fp = fopen('./graficast.gif', 'wb');
curl_setopt($ch, CURLOPT_FILE, $fp);
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_exec($ch);
curl_close($ch);
fclose($fp);
?>
-
I get the key and paste it in to my website http://greenecountyweathernet.com
in my index page but is still ask for a key?
can anybody help me thanks?
bobby
-
You have a colon after the = sign right before the key, try removing that.
-
Thought I would add my two cents in with dynamic centering of the map and dynamic loading of radar sites using an airport identifier.
Thanks for taking the time to all of that!
Very interesting information.
-
...just discovered this page today. Really great stuff! Guess nobody's been around for a couple weeks...but I though I'd post the version I developed today. I still have alot to do, but it's coming along. My main objective it to develop gps aware smartphone versions..namely webos.
http://snowangelandotter.com/cgi-bin/gmap3.pl?chart=N0R&id=CAE&wrap=10
Just click one of the 'arrows' to change to a different radar location. The number of images in the loop is controlled by changing the 'wrap=xx' in the url.
Cheers.
Dave.
-
Nice! I like that concept.
-
...anybody have a Google Maps API v3 of these routines? Namely radar.js.
Thanks...and, again, great stuff here.
Dave.
-
...anybody have a Google Maps API v3 of these routines? Namely radar.js.
Thanks...and, again, great stuff here.
Dave.
I want work on it at some point but it's not real high on my priority list just yet. I have a long list of scripts in my todo list. I have been working on a script that writes the normal "rainfall to date" for every day of the year, along with the "normal & record highs and lows" for each day of the year. That script is up and running, I just need to clean it up a bit, then onto the next.
I was using the Wunderground high and low data via Weather Display, but the closest city I could use is a significantly different climate. I suspect that might be an issue for many of our rural area stations in the U.S..
-
This is a very cool script...
that I would like to incorporate into my website. I have it running as a small image on my main page,
http://stu-in-flag.net/index.php (http://stu-in-flag.net/index.php)
I have been able to get it to run on an independent page
http://stu-in-flag.net/ridge.html (http://stu-in-flag.net/ridge.html).
But, when I try to link to a site that includes, via php include, the ridge.html file
http://stu-in-flag.net/big-radar.php (http://stu-in-flag.net/big-radar.php)
the site will literally run a single, first time. After that the ridge.html file will not animate the radar, and it appears that the css file does not function on that page. I have tried to breakdown the ridge.html code and place it in the big-radar.php file, but that ends up causing the same issue.
Thoughts?
Thanks in advance!
-
Works for me!
-
I love this script! I just found it today and have put it on my site: http://midatlanticweathergroup.org/
The only issue is, for each marker, the bubble pops up in the same spot. Example: If you click on a site in VA, it will still pop up to the north of MD.
How do I go about fixing that?
-
I love this script! I just found it today and have put it on my site: http://midatlanticweathergroup.org/
The only issue is, for each marker, the bubble pops up in the same spot. Example: If you click on a site in VA, it will still pop up to the north of MD.
How do I go about fixing that?
Glad that you find the script useful for your site..
The original marker code was written for 1 marker only. I would usually leave it up to the individual users to do their own research and add on their own custom code, but I added a new marker function to the map today, along with the code for 3 separate markers. You can easily add on as many markers as you like in the proper area near the bottom of the script. With my adding of 3 markers you should be able to use the same syntax samples to add on as many markers as you wish.
<script type="text/javascript">
var Clock ;
var Cycle ;
var Google;
var Helper;
var Last= 0;
var Skew= 0;
var Wrap= 10;
var Idle=100;
var Back=500;
var Radar=[];
var Ridge=["DAX"];
var Product="NCR";
function createMarker(point, text, title) {
var marker = new GMarker(point,{title:title});
GEvent.addListener(marker, "click", function() {
marker.openInfoWindowHtml(text);
});
return marker;
}
function Pause(pause)
{
Idle=pause*10;
Back=pause*50;
}
function Opacity(opacity)
{
for (var i=0;Ridge[i];i++)
{
Radar[i].opacity(opacity);
}
}
function Loop()
{
for (var i=0;Ridge[i];i++)
{
Helper.childNodes[i].childNodes[0].data=Radar[i].select(Last);
}
Last=(Last+1)%Wrap;
Clock=clearTimeout(Clock);
Clock=setTimeout("Loop()",Last ? Idle : Back);
}
function Feed()
{
var stub="http://www.srh.noaa.gov/ridge2/JSON_generator.php?callback=CallBack&frames="+Wrap;
for (var i=0;Ridge[i];i++)
{
Radar[i].feed(stub+"&rid="+Ridge[i]+"&product="+Product);
}
Cycle=clearTimeout(Cycle);
Cycle=setTimeout("Feed()",150000);
}
function CallBack(callback)
{
var stub="http://www.srh.noaa.gov/";
var pair;
var reload=[];
for (var i=0;callback.directory[i];i++)
{
pair=callback.directory[i].match(/([A-Z][A-Z][A-Z]|[A-Z][0-9][A-Z])/g);
reload[i]=stub+callback.directory[i];
}
for (var i=0;Ridge[i];i++)
{
if (pair) if (pair[0]==Product) if (pair[1]==Ridge[i]) Radar[i].reload(reload);
}
}
function Load()
{
Google=document.getElementById("google");
Google.style.width ="640px";
Google.style.height="640px";
GDraggableObject.setDraggableCursor("pointer");
GDraggableObject.setDraggingCursor ("pointer");
Google=new GMap2(Google);
Google.setCenter (new GLatLng(38.496,-121.672),7, G_PHYSICAL_MAP);
Google.setUIToDefault();
Helper=document.getElementById("helper");
for (var i=0;Ridge[i];i++)
{
Helper.appendChild(document.createElement("DIV"));
Helper.childNodes[i].appendChild(document.createTextNode(""));
Radar[i]=new FrameAnimationLayerOverlay({bbox:BBox(Ridge[i],Product),size:{x:640,y:640},last:Last,skew:Skew,wrap:Wrap,name:Ridge[i]+"_"+Product});
Google.addOverlay(Radar[i]);
}
Feed();
Loop();
var marker = createMarker(
new GLatLng(38.496,-120.672),
"El Dorado Weather<br/>Updated: <?php echo $date; ?> at <?php echo $time; ?><br/><br/>Temperature: <?php echo $temperature; ?>°F<br/>Pressure: <?php echo $baroinusa2dp; ?><br/>Rain Today: <?php echo $dayrn; ?>in<br/>Humidity: <?php echo $humidity; ?>%<br/>Dew Pt: <?php echo $dewpt; ?>°F", 'El Dorado Weather');
Google.addOverlay(marker);
var marker = createMarker(
new GLatLng(38.496,-121.672),
'Marker text', 'Sacramento Area');
Google.addOverlay(marker);
var marker = createMarker(
new GLatLng(38.496,-122.672),
'Marker text', "Near Highway 101");
Google.addOverlay(marker);
}
function Free()
{
GUnload();
}
</script>
The sample page for this code in action can be seen here: http://www.eldoradocountyweather.com/current/misc/google-maps/dax/ridge.html (http://www.eldoradocountyweather.com/current/misc/google-maps/dax/ridge.html)
-
Thank you very much!
Only issue I seem to have is when I change "NCR" to "N0R" it doesn't load the radar.
-
...anybody have a Google Maps API v3 of these routines? Namely radar.js.
Thanks...and, again, great stuff here.
Dave.
Has anyone ported this over for API v3?
Thanks, looks like a great script!
-
Thank you for this great script!
I am having a problem getting the radar to show up on the map. I tried all the suggestions from the previous 9 pages of this thread and still cannot get it to show.
If it helps, I get this error in IE:
Webpage error details
User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.0; Trident/4.0; GTB6.6; SLCC1; .NET CLR 2.0.50727; Media Center PC 5.0; .NET CLR 3.5.30729; .NET CLR 3.0.30729; .NET4.0C)
Timestamp: Thu, 6 Jan 2011 21:02:55 UTC
Message: '2' is null or not an object
Line: 2487
Char: 2
Code: 0
URI: http://www.bathmaineweather.com/ridge.js
Here is the page: http://www.bathmaineweather.com/ridge.html
Thank you for any help you can provide!
-
Thank you for this great script!
I am having a problem getting the radar to show up on the map. I tried all the suggestions from the previous 9 pages of this thread and still cannot get it to show.
If it helps, I get this error in IE:
Webpage error details
User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.0; Trident/4.0; GTB6.6; SLCC1; .NET CLR 2.0.50727; Media Center PC 5.0; .NET CLR 3.5.30729; .NET CLR 3.0.30729; .NET4.0C)
Timestamp: Thu, 6 Jan 2011 21:02:55 UTC
Message: '2' is null or not an object
Line: 2487
Char: 2
Code: 0
URI: http://www.bathmaineweather.com/ridge.js
Here is the page: http://www.bathmaineweather.com/ridge.html
Thank you for any help you can provide!
Hi MaineBirder,
First off, welcome to the forum!
In your ridge.html file please remove the radar call letters [CAR] at around line#25. [CAR] is not a valid radar station. This is what's breaking your code. Did you want the Caribou, Maine Station radar on your map? If so the call letters for Caribou is [CBW].
-
Hi MaineBirder,
First off, welcome to the forum!
In your ridge.html file please remove the radar call letters [CAR] at around line#25. [CAR] is not a valid radar station. This is what's breaking your code. Did you want the Caribou, Maine Station radar on your map? If so the call letters for Caribou is [CBW].
That was the problem! Works fine now. Thank you for your help Danny, it's greatly appreciated.
I sent you an email from your web site yesterday asking about your looping satellite. Did you receive it?
John
-
Danny -
Thanks for the awesome contribution! I am currently tweaking and testing before launch on my site, and I am wondering where I can preset the animation speed? If I missed it previously in the thread or instructions, I apologize.
I am running my setup here:
http://www.lakevilleweather.com/google_ridge_radar/ridge.html
Regards,
Kris
-
Danny -
Thanks for the awesome contribution! I am currently tweaking and testing before launch on my site, and I am wondering where I can preset the animation speed? If I missed it previously in the thread or instructions, I apologize.
I am running my setup here:
http://www.lakevilleweather.com/google_ridge_radar/ridge.html
Regards,
Kris
Hi Kris,
My pleasure!
NO, I don't think I ever covered the default animation speed. It's very easy to change.
Near the top of the script where it says:
var Idle=100;
The higher the number the slower the animation. This is the idle time between images as they are being animated.
-
Thank you!!
Kris
-
OK guys before I do something very drastic here I need some help. Started working on the script several months ago but put everything aside for fall fishing and deer hunting but it's time to get back to my weather. Worked several hours last night and a couple tonight and I am getting nowhere. ](*,)
I have my goggle map (got to tweak a tad on centering) but I am not getting any radars or my "home marker" to show on the map. No precip around tonight but last night with precip around; same thing...just the map. I have tried "NCR", ("NCR") and ["NCR"] and no radar and no home marker. :?:
Any help, suggestions, ideas would be greatly appreciated!!!! The ONLY thing I have not tried I believe is an absolute path (ie. http://www.carolinastormwatch.com/goggle_ridge_radar/ridge.js) for the js paths but didn't think this was necessary. I did have the files just in my main directory but put them a sub directory (goggle_ridge_radar) to see if that would help...no go.
Link: http://www.carolinastormwatch.com/goggle_ridge_radar/ridge_test.html
Many thanks!!
-
OK guys before I do something very drastic here I need some help. Started working on the script several months ago but put everything aside for fall fishing and deer hunting but it's time to get back to my weather. Worked several hours last night and a couple tonight and I am getting nowhere. ](*,)
I have my goggle map (got to tweak a tad on centering) but I am not getting any radars or my "home marker" to show on the map. No precip around tonight but last night with precip around; same thing...just the map. I have tried "NCR", ("NCR") and ["NCR"] and no radar and no home marker. :?:
Any help, suggestions, ideas would be greatly appreciated!!!! The ONLY thing I have not tried I believe is an absolute path (ie. http://www.carolinastormwatch.com/goggle_ridge_radar/ridge.js) for the js paths but didn't think this was necessary. I did have the files just in my main directory but put them a sub directory (goggle_ridge_radar) to see if that would help...no go.
Link: http://www.carolinastormwatch.com/goggle_ridge_radar/ridge_test.html
Many thanks!!
Hi Tom,
You have the same sort of problem that MaineBirder had a few posts up. There is no AQK radar station. It looks like you just transposed it wrong (very easy to do). It should be "AKQ". Fix that typo and everything should be working fine for you including the marker.
I would like to mention to others that may try this script. I highly recommend adding just one radar station at a time. See if that works and then go on and add on another one.
-
Many thanks for the help Danny!! Great script! :grin:
I can't believe that little error caused me hours of frustration; well, yeah I can. I went over and over my script and did not catch that. :oops: You are exactly correct in saying the best way to test the script is to use ONE site. For me it has to be K.I.S.S. or I always end up with one little error that ends up costing me hours of frustration.
Thanks again!!
Tom
-
I am curious where/how you found the lat/lon projection data for each radar site in the ridge.js file? I'm looking to project the conus map in a similar fashion, just lack the projection coordinates. Thanks!
-
I am curious where/how you found the lat/lon projection data for each radar site in the ridge.js file? I'm looking to project the conus map in a similar fashion, just lack the projection coordinates. Thanks!
NOAA puts the coordinates for each radar station in a .gfw world file. These files reside with the standard .gif radar files in the "RadarImg/RadarType" directory.. Such as RadarImg/N0R - RadarImg/NCR - RadarImg/NOS - etc etc
-
Do you have similar functionality written using Google Maps V3?
-Subh
-
Do you have similar functionality written using Google Maps V3?
-Subh
Not completely. The script as is, uses some V3 features, but for the most part it is pure V2. I have no plans to update it to V3 at this point unless it breaks.
-
How come Google Maps radar doesn't label my town on its maps even though it's the 10th largest town in Oklahoma? I noticed it's very generous in labeling much smaller towns like Kingfisher and Hennessy. Zooming in to enough degree does solve the issue, though.
http://stillwaterweather.com/ridge.html (http://stillwaterweather.com/ridge.html)
-
How come Google Maps radar doesn't label my town on its maps even though it's the 10th largest town in Oklahoma? I noticed it's very generous in labeling much smaller towns like Kingfisher and Hennessy. Zooming in to enough degree does solve the issue, though.
http://stillwaterweather.com/ridge.html (http://stillwaterweather.com/ridge.html)
I am pretty sure this was a rhetorical question. I did see an interesting observation that takes the idea a little bit further.
http://www.41latitude.com/post/611286757/google-maps-city-dots (http://www.41latitude.com/post/611286757/google-maps-city-dots)
-
Can someone refresh my memory, how can I get rid of the image URLs in the ridge.html? I thought I had it but can't seem to find how to remove those.
Thanks,
Todd
-
Can someone refresh my memory, how can I get rid of the image URLs in the ridge.html? I thought I had it but can't seem to find how to remove those.
Thanks,
Todd
Hi Todd,
You can find the code to get rid of the URLs below the radar display here:
http://www.wxforum.net/index.php?topic=8377.50 (http://www.wxforum.net/index.php?topic=8377.50)
It's the 10th post down...
-
Much thanks, that is exactly what I was looking for.
Todd
-
Did you ever get the V3 code worked out? I've been trying to figure that out for awhile.
Dave.
Do you have similar functionality written using Google Maps V3?
-Subh
-
Did you ever get the V3 code worked out? I've been trying to figure that out for awhile.
Hi there Dave,
Sorry, no I haven't....
My newer work is more in the direction of incorporating multiple gis overlay options instead of having the animated radar only. It pretty much renders the google map radar here obsolete as far as my doing any more work on it.
I don't think very many here would be all that interested in something like this, but here's a sample of the type of maps I've been working on:
This is a good example that the NWS is now developing which I am also running on my own site. It has a filter I really like that darkens the map a bit so the radar stands out better. The radar noise is also removed & it has a toggle to enlarge the map to full screen:
http://www.eldoradocountyweather.com/radar/conus/conus-googlemap-radar.html (http://www.eldoradocountyweather.com/radar/conus/conus-googlemap-radar.html)
-
My map located at http://156.42.96.39/alert/Google/weather.html is not displaying radar data correctly as of today on IE8 and IE7 (on Ice weasel and Chrome is works correctly). If you go to the map it has a NWS tab – located below the map. Once you get there you can add multiple cities and Add NWS Radar onto the map – add button is in the lower left hand corner. This has been working in IE8 and IE7 for over a year, what changed? I am getting a Stack overflow @ line:0 whenever I try to add data. I have looked at other web pages doing the same thing and they are getting these errors too - http://www.google.com/url?sa=D&q=http://www.eldoradocountyweather.com/radar/radar-google/florida/florida-radar.html and http://www.google.com/url?sa=D&q=http://nerain.gisworkshop.com/map.html to name a few. IE7 is saying it is a file within nws_radar_test_revised.js with line 183 which is Helper.childNode.childNodes[0].data=Radar.select(Last);. Does that mean anything to anyone? Any help will be GREATLY appreciated!!! Thanks.
-
I was able to reproduce the error on IE8 but I don't have a current copy of IE7.
There is no error visible on IE9, Firefox or Chrome. Upgrading to IE9 should solve the issue...
Not sure yet what the actual cause is for this error in IE7/8. Looking into it..
-
Thank you so much. I work for The Flood Control District of Maricopa County and we use these map for our Flood Warning. All of our different maps are located at http://www.fcd.maricopa.gov/Rainfall/rainfall.aspx and are running the same code to display the NWS radar. I will upgrade to IE9 at home but the whole county has more than 14,000 employees with IE7. Per IT last weeks the county is postponing the upgrade to IE8 for some reason.
Ice weasel doesn’t give an error either.
Any suggestions or ideas would be great. Thanks!!!
-
I am getting a stack overflow error. It is coming from within the radar.js file. Line 184 - Helper.childNodes.childNodes[0].data=Radar.select(Last);
Anyone know why this is happening or how I can fix it?
Go to http://156.42.96.39/alert/Google/weather.html - click NWS radar tab then add radar to map by clicking lower left hand button. Getting the error in IE7 and IE8 - everything else seems to be working fine.
function Loop()
{
var Ridge = radarSiteSelection();
for (var i=0;Ridge;i++)
{
Helper.childNodes.childNodes[0].data=Radar.select(Last);
}
Last=(Last+1)%Wrap;
Clock=clearTimeout(Clock);
Clock=setTimeout("Loop()",Last ? Idle : Back);
}
Thanks.
-
There's usually so dang much ground clutter on my google radar map that it just looks too much of a mess. Is there a way to fix it? I use 12 radars, so maybe cutting them by half would help.
http://stillwaterweather.com/ridge.html (http://stillwaterweather.com/ridge.html)
-
function Loop()
{
var Ridge = radarSiteSelection();
for (var i=0;Ridge;i++)
{
Helper.childNodes.childNodes[0].data=Radar.select(Last);
}
Last=(Last+1)%Wrap;
Clock=clearTimeout(Clock);
Clock=setTimeout("Loop()",Last ? Idle : Back);
}
Sorry for the delay. I just now got the chance to look at it. Your code has been altered somehow from the code I released in this thread. Also, I am no longer getting any errors. That tells me it probably wasn't on my end.
I think if you go back to the original released code, it should solve your issue.
Here is what it should look like:
function Loop()
{
for (var i=0;Ridge[i];i++)
{
Helper.childNodes[i].childNodes[0].data=Radar[i].select(Last);
}
Last=(Last+1)%Wrap;
Clock=clearTimeout(Clock);
Clock=setTimeout("Loop()",Last ? Idle : Back);
}
When you compare the code I posted above to your snippit of code, notice where it says:
"data=Radar.select(Last);"
in your sample code.
The code I released:
"data=Radar[i].select(Last);"
:
The brackets for the array element are missing. Since this snippet of code is altered, there could very well be several places in the code that are erroneous.
-
ELDoradoWx,
Thank you so much for taking the time to look over my issue. I looked over my JavaScript so many times before posting my question and didn't catch that error. I have changed my code back to the original released code and the errors Stack Overflow @ Line:0 errors have stopped!!!! Yayyy!!!
I really appreciate the time you took to look into this :grin:
Chandra
-
Have the script up and running here http://mclwx.info/wxgoogle-radar.php (http://mclwx.info/wxgoogle-radar.php). Great script. Love it \:D/ Have 15 radar sites running - no problems.
I've chosen the Satellite view as default. However when the page opens there aren't any labels; i.e. no state boundaries, highways, etc., have to click the check box to add them.
I would like for the labels to be there when the the page opens. What do I change, or add, to make this happen?
Thanks
Ken
-
Have the script up and running here http://mclwx.info/wxgoogle-radar.php (http://mclwx.info/wxgoogle-radar.php). Great script. Love it \:D/ Have 15 radar sites running - no problems.
I've chosen the Satellite view as default. However when the page opens there aren't any labels; i.e. no state boundaries, highways, etc., have to click the check box to add them.
I would like for the labels to be there when the the page opens. What do I change, or add, to make this happen?
Thanks
Ken
Hi Ken,
You would need to use the G_Hybrid_MAP to display the satellite map with labels.
Change this snippet on code:
Google.setCenter (new GLatLng(39.179,-95.238),6, G_SATELLITE_MAP);
With this snippet of code:
Google.setCenter (new GLatLng(39.179,-95.238),6, G_HYBRID_MAP);
-
Danny -
Thank you, Sir. That was simple enough. As I said in my original post Great script =D> Love it.
Ken
-
Here is the Demo Page for the new "Relief Map with an Open Street Maps overlay".
http://www.eldoradocountyweather.com/current/misc/google-maps/geo-google-radarmap/geo-ridge.html (http://www.eldoradocountyweather.com/current/misc/google-maps/geo-google-radarmap/geo-ridge.html)
The map includes the other default map types as well. The map includes, Relief, OSE [OpenStreetMaps], Satellite, Terrain, Hybrid and the regular Map.
I feel that OpenStreetMap is the best FREE street map on the net, which I contribute work to. It is available on the new map by selecting the Relief or OSM mapping options. To view the Hybrid map, select the Satellite map option and click on Layer and select Google Labels.
View the Open Street Map on Google Maps Version 3:
http://www.eldoradocountyweather.com/current/misc/google-maps/google-maps-v3/v3-openstreetmap.php (http://www.eldoradocountyweather.com/current/misc/google-maps/google-maps-v3/v3-openstreetmap.php)
I will not be supporting this special map version but I wanted to offer it as another choice.
For customizing it please refer to prior posts in this thread as a guide or on my site. You can grab the code by doing a View Source Code on the page.
All of my other scripts including this one can be found here:
http://www.eldoradocountyweather.com/scripts/weather-scripts.php (http://www.eldoradocountyweather.com/scripts/weather-scripts.php)
-
If one can't stand the ugly, worthless mess that ground clutter makes out of your google radar map, then I suggest using this highly interactive weather map, instead:
http://www.intellicast.com/Local/WxMap.aspx (http://www.intellicast.com/Local/WxMap.aspx)
-
My radar has been working fine for many months until yesterday. Now it wont load for some reason. Any ideas?
http://K4KMGWeather.com (http://K4KMGWeather.com)
-
Looks like it's working!
-
Thanks. Not here though. I just keep getting 'transferring data from K4KMGWeather.com' in the lower browser bar.
Tom
-
I like that GRL3 storm attributes table... but it won't work for me. I've tried both graphical and text. Tried different radar sites, no luck. Even downloaded the example.php file... no luck.
-
Actually, come to think of it, I've never looked at it when there's been storm activity in my area! LOL. For all I know, it may not be working. I'll have to remember to check next storm.
-
You at least get the header and the message that there are no storms. I don't even get that. I'm thinking maybe the ftp address is wrong, I don't get a time or date.
-
May seem like a dumb question, but are u sure u have all the req files?
Solved my problem by rebooting FF
-
Downloaded all the zip files, copied all of them to my website. Checked all the settings. I added it below everything else on this page. You'll have to wait to see what it produces since it takes a moment to apparently time-out. http://www.daculaweather.com/grlevel3/ffc_test.php
-
Been a while since I set this up, but the files I'm using for it are:
table
rdcfg
crrdr
If I remember correctly, all I changed was my radar site, CLX, and maybe some table formatting data to make it fit.
Each radar type pg has to call the table.php script. ie. CR, BR1, etc.... I can send you any if you'd like a look.
From your 'view source', it doesn't look like your pulling any of the table data. Yours is only showing the table data I've highlighted in red. Compare with mine.
<h3 style="font-family: arial,helvetica;">Storm Cell Attribute Table for Charleston, South Carolina (KCLX) Radar</h3>
<h6 style="font-family: arial,helvetica;">Retrieved: Fri, 22 Jul 2011 11:01:04 -0400; Data valid day: 22; Data valid time: 1447Z
(<a href="javascript:history.go();">Refresh</a>)</h6>
<table width="600" cellpadding="1" cellspacing="0"
border="1" bordercolor="">
Your source shows none of the following: <tr>
<td align="center" bgcolor="black"><font face="arial,helvetica" size="+0" color="white"><b>Storm Ident</b></font></td>
<td align="center" bgcolor="black"><font face="arial,helvetica" size="+0" color="white"><b>Az/Ran</b></font></td>
<td align="center" bgcolor="black"><font face="arial,helvetica" size="+0" color="white"><b>TVS<br><small><small><a href="tvsta.php" target="raddon">Table</a></small></small><td align="center" bgcolor="black"><font face="arial,helvetica" size="+0" color="white"><b>MESO<br><small><small><a href="mesta.php" target="raddon">Table</a></small></small><td align="center" bgcolor="black"><font face="arial,helvetica" size="+0" color="white"><b>POSH</b></font></td>
<td align="center" bgcolor="black"><font face="arial,helvetica" size="+0" color="white"><b>POH</b></font></td>
<td align="center" bgcolor="black"><font face="arial,helvetica" size="+0" color="white"><b>Max Size</b></font></td>
<td align="center" bgcolor="black"><font face="arial,helvetica" size="+0" color="white"><b>VIL</b></font></td>
<td align="center" bgcolor="black"><font face="arial,helvetica" size="+0" color="white"><b>Max dBZ</b></font></td>
<td align="center" bgcolor="black"><font face="arial,helvetica" size="+0" color="white"><b>Height</b></font></td>
<td align="center" bgcolor="black"><font face="arial,helvetica" size="+0" color="white"><b>Top</b></font></td>
<td align="center" bgcolor="black"><font face="arial,helvetica" size="+0" color="white"><b>Fcst Mvmt</b></font></td>
</tr>
<tr><td align="center" bgcolor="#ffffaa" colspan="12"><font face="arial,helvetica" size="+0" color="black"><b>No Thunderstorms in Range of Radar Site</b></font></td></tr>
</table>
I just sort of hack my way through all of this, so I could be waaaay off!
Tom
-
Yep, but I can't figure out why. Did you set any permissions on any of your files? I might try that next.
-
Nope, all 0644
-
Yea, I changed them all and it didn't matter.
-
The settings in my php5.ini file allow fopen
;;;;;;;;;;;;;;;;;;
; Fopen wrappers ;
;;;;;;;;;;;;;;;;;;
; Whether to allow the treatment of URLs (like http:// or ftp://) as files.
allow_url_fopen = On
; Whether to allow include/require to open URLs (like http:// or ftp://) as files.
allow_url_include = On
-
Without the table being setup properly, there is no where for the data to go. Your table should, at least and even without data, look like mine. Currently, you have no fields that the data can populate.
-
I think it's because it's hanging up before it gets anything. Can you send or post your table.php file for me. I didn't change anything in mine but it looks incomplete.
-
My ini file is the same as yours.
table.php
<?php
require("crrdr.php");
# CREDIT - DO NOT REMOVE WITHOUT PERMISSION
# Constituent Supplementary File
# Author: Jordan Gerth, development at wiscwx dot com
# Documentation: http://www.wiscwx.com/jordan/crrdr/index.html
#####################################
if ($dispm == 1) {
$swt = "Graphic";
$swtnu = 0;
} else {
$swt = "Text";
$swtnu = 1;
}
if ($endol < $maxrw) $disher = $endol;
else $disher = $maxrw;
?>
<h3 style="font-family: <? echo $hff; ?>;"><? echo $hder; ?></h3>
<h6 style="font-family: <? echo $ff; ?>;"><? echo $vdts; ?>
(<a href="javascript:history.go();">Refresh</a>)</h6>
<table width="<? echo $width; ?>" cellpadding="<? echo $cllpa; ?>" cellspacing="<? echo $cllsp; ?>"
border="<? echo $brdr; ?>" bordercolor="<? echo $bclr; ?>">
<?php echo $html; ?></table>
<table width="<? echo $width; ?>" cellpadding="0" cellspacing="0" border="0"><tr>
<td align="left"><font style="font-family: <? echo $ff; ?>; font-size: 9px;"><b>
Total number of storm cells on radar: <? echo $endol; ?></b>;
Number of storm cells on table: <? echo $disher; ?></font></td>
<td align="center"><font style="font-family: <? echo $ff; ?>; font-size: 9px;">
<a href="http://www.wiscwx.com/cr/intro.html" target="_blank">Introduction</a></font></td>
<td align="right"><font style="font-family: <? echo $ff; ?>; font-size: 9px;">
<a href="?dispm=<? echo $swtnu; ?>">Switch to <? echo $swt; ?></a></font></td>
</tr></table>
<h5 style="font-family: <? echo $ff; ?>;"><? echo $fter; ?></h5>
-
Just like mine. :?:
-
I'm assuming you've been here?
http://www.wiscwx.com/jordan/crrdr/index.html
In your crrdr.php file - is this correct? $crdat = @fopen( "ftp://tgftp.nws.noaa.gov/SL.us008001/DF.of/DC.radar/DS.p37cr/SI.".$rregi.$radar."/sn.last" , "r" ) or die($lerro); I believe this is where the data is called from?
-
Yep, read all the instructions, and that line is exactly the same in my file.
That's what I don't get, it was a very straight forward install.
-
Got this in you CR.php file?
<?php require("table.php"); ?>
-
In which file?
-
Composite Reflectivity
Would be your ffc_test.php
-
I don't know why mine isn't working. I put the Lat./Lon. in, the google code, and the 3 letter radar id, and all I get on my pc is a stagnent map. However, I don't get anything at all on my website. sixmileturn-weather.com
I am running an Davis Vantage Pro2 with Cumulus 1.9.2 build 1005
<html>
<head>
<script src="http://maps.google.com/maps?file=api&v=2&ABQIAAAABVexnRpPekhoVpCGaDDoKxTxJRZepZpOVZW-zHU13RTD2wxa4hQCnUWyLpLbfyiNWdf1rv5eog7IMg" type="text/javascript">
</script>
<script src="http://www.sixmileturn-weather.com/current/misc/google-maps/dax/radar.js"></script>
<script src="http://www.sixmileturn-weather.com/current/misc/google-maps/dax/ridge.js"></script>
<script>
var Clock ;
var Cycle ;
var Google;
var Helper;
var Last= 0;
var Skew= 0;
var Wrap= 10;
var Idle=100;
var Back=500;
var Radar=[];
var Ridge=["ZZV,IND"];
var Product="NCR";
function Pause(pause)
{
Idle=pause*10;
Back=pause*50;
}
function Opacity(opacity)
{
for (var i=0;Ridge[i];i++)
{
Radar[i].opacity(opacity);
}
}
function Loop()
{
for (var i=0;Ridge[i];i++)
{
Helper.childNodes[i].childNodes[0].data=Radar[i].select(Last);
}
Last=(Last+1)%Wrap;
Clock=clearTimeout(Clock);
Clock=setTimeout("Loop()",Last ? Idle : Back);
}
function Feed()
{
var stub="http://www.srh.noaa.gov/ridge2/JSON_generator.php?callback=CallBack&frames="+Wrap;
for (var i=0;Ridge[i];i++)
{
Radar[i].feed(stub+"&rid="+Ridge[i]+"&product="+Product);
}
Cycle=clearTimeout(Cycle);
Cycle=setTimeout("Feed()",150000);
}
function CallBack(callback)
{
var stub="http://www.srh.noaa.gov/";
var pair;
var reload=[];
for (var i=0;callback.directory[i];i++)
{
pair=callback.directory[i].match(/([A-Z][A-Z][A-Z]|[A-Z][0-9][A-Z])/g);
reload[i]=stub+callback.directory[i];
}
for (var i=0;Ridge[i];i++)
{
if (pair) if (pair[0]==Product) if (pair[1]==Ridge[i]) Radar[i].reload(reload);
}
}
function Load()
{
Google=document.getElementById("google");
Google.style.width ="640px";
Google.style.height="640px";
GDraggableObject.setDraggableCursor("pointer");
GDraggableObject.setDraggingCursor ("pointer");
Google=new GMap2(Google);
Google.setCenter (new GLatLng(40.1031,-82.1216),7, G_PHYSICAL_MAP);
Google.setUIToDefault();
Helper=document.getElementById("helper");
for (var i=0;Ridge[i];i++)
{
Helper.appendChild(document.createElement("DIV"));
Helper.childNodes[i].appendChild(document.createTextNode(""));
Radar[i]=new FrameAnimationLayerOverlay({bbox:BBox(Ridge[i],Product),size:{x:750,y:750},last:Last,skew:Skew,wrap:Wrap,name:Ridge[i]+"_"+Product});
Google.addOverlay(Radar[i]);
}
Feed();
Loop();
}
function Free()
{
GUnload();
}
</script>
</head>
<body onload="Load();" onunload="Free();">
<br/><br/><br/><br/>
<div style="text-indent:0px; width:100%; height:100%; font-family:arial; font-size:14px; font-weight:normal; overflow:hidden;" align="center">
<div id="google"></div>
<div id="helper"></div>
<div>
<input type="radio" name="pause" onclick="Pause( 5);"> Extra Fast
<input type="radio" name="pause" onclick="Pause( 8);"> Fast
<input type="radio" name="pause" onclick="Pause(12);"> Medium
<input type="radio" name="pause" onclick="Pause(18);"> Slow
<input type="radio" name="pause" onclick="Pause(25);"> Extra Slow
<input type="radio" name="pause" onclick="Pause( 2000);"> Pause
</div>
<div>Opacity
<input type="radio" name="opacity" onclick="Opacity(0.25);"> 25%
<input type="radio" name="opacity" onclick="Opacity(0.50);"> 50%
<input type="radio" name="opacity" onclick="Opacity(0.75);"> 75%
<input type="radio" name="opacity" onclick="Opacity(1.00);"> 100%
</div>
</div>
</body>
</html>
-
The path to your radar.js and ridge.js is broken. No such files exist there..
Also, I have never seen a radar station named "ZZV". You will need to remove it.
Besides ZZV not being a valid radar station, another issue is the missing quotation marks in the below line.
You have: var Ridge=["ZZV,IND"];
It should look like this if you use more than 1 station: var Ridge=["ZZV","IND"];
You should notice that each of the stations call letters have a beginning and ending quotation mark.
Change it to this: var Ridge=["IND"]; Then see it you can get the one station working first. If it works, then go ahead and add more stations..
-
If one can't stand the ugly, worthless mess that ground clutter makes out of your google radar map, then I suggest using this highly interactive weather map, instead:
http://www.intellicast.com/Local/WxMap.aspx (http://www.intellicast.com/Local/WxMap.aspx)
The full size page is even more cool at http://www.intellicast.com/Local/WxMapFull.aspx (http://www.intellicast.com/Local/WxMapFull.aspx) So now the hopelessly messy google radar map at http://stillwaterweather.com/ridge.html (http://stillwaterweather.com/ridge.html) has been dropped from my site as a link.
-
I've read there's a down side to radar maps like by Intellicast. You may be missing some detail as a result of a much cleaner look. A map like that typically has any returns under 20 dbz filtered out. So this is going to remove ability to see features like fronts and outflow boundaries. So a messy looking map with ground clutter may be more valuable than one may think.
-
Well, for some reason the Ridge radar stopped working tonight, my site isn't the only one having no radar images. Seems the returned images are just blank, they have the GIF89 header and some data, just not enough for an image, for example:
Location: http://www.srh.noaa.gov/ridge/RadarImg/NCR/BUF/BUF_20111128_2134_NCR.gif
Type: GIF Image
Size: 0.93 KB (954 bytes)
Dimensions: 600px × 550px
Real strange, was working this afternoon. :???:
George
-
Could have been down yesterday. http://www.daculaweather.com/nexrad_status.php
-
This just stopped working today. I looked on the websites of some of the people who have posted here, and it looks like it is not working for anyone.
The problem appears to be the web server www.srh.noaa.gov. The radar images on this site are either missing or blank. In addition, the http://www.srh.noaa.gov/ridge2/JSON_generator.php is generating bad file names.
The radar images on radar.weather.gov are still good, but there doesn't seem to be a JSON_generator.php program that can tell you the image file names.
Is this a temporary problem with www.srh.noaa.gov? Or are we SOL?
-
By the way, a few days ago I finished rewriting this code to run on Google Maps V3, and this week I was going to rewrite it for Leaflet (open source map library from Cloudmade). But now it doesn't work. I sure hope the problem is temporary.
The only issue is getting the file names for the animation frames of the weather radar. If anyone knows another way to do this (that doesn't violate cross-domain restrictions) please let me know. I'd rather not use Flash, either. Looking for a JavaScript solution.
-
Yep, sure enough, not working. Glad you pointed that out.
-
By the way, a few days ago I finished rewriting this code to run on Google Maps V3, and this week I was going to rewrite it for Leaflet (open source map library from Cloudmade). But now it doesn't work. I sure hope the problem is temporary.
The only issue is getting the file names for the animation frames of the weather radar. If anyone knows another way to do this (that doesn't violate cross-domain restrictions) please let me know. I'd rather not use Flash, either. Looking for a JavaScript solution.
All the Federal Government stuff is public domain, use it as you wish. I sent an email to the webmaster to see what the problem is.
-
I wrote something to get around the problem -- a replacement for JSON_generator.php (attached). It is pretty short, but it uses a PHP library called EasyWebFetch.php, which you can find about halfway down the page at http://nashruddin.com/fetching-a-web-page-from-php-code.html (under "The Downloads", just before the comments).
You will have to put these two PHP files on a server somewhere. You'll have to modify ElDoradoWx's scripts to call this service (where ever you put JSON_generator.php) rather than http://www.srh.noaa.gov/ridge2/JSON_generator.php (which doesn't work any more). Also make sure you fetch the images from http://radar.weather.gov instead of http://www.srh.noaa.gov
My app is working again with these changes. Good luck!
-
Looks like I have a lot of work to do! :grin:
-
Got this back from the NWS:
-----------------------------
From: Corey Pieper [mailto:corey.pieper@noaa.gov]
Sent: Wednesday, January 04, 2012 11:04 AM
To: Dennis Cain
Subject: Fwd: FW: JSON Generator
Dennis,
With the move to RIDGE 2, these services are pretty fluid right now. Go to this feed, which points to the new RIDGE2 versions of the images: http://www.srh.noaa.gov/ridge2/ajax/radar_paths.php?rid=FWS&pid=N0Q
...with a warning, that this URL will also change upon the move of RIDGE 2 to NIDS - though I'm not certain what it will be at this time.
Corey
-
Thanks Dennis! Is there some way to keep informed about these changes? For example, would it be ok if I contacted Corey?
-
Actually I'm Steve but go ahead, it's the NWS!
-
My app is working again with these changes. Good luck!
.. could you share a little more info about how you modified the original?
Thanks,
Dennis
-
After I looked at his script, I'm sure it will work to fetch the images for one site, but it didn't appear to accommodate multiple radar sites per page. I could be wrong!
-
After I looked at his script, I'm sure it will work to fetch the images for one site, but it didn't appear to accommodate multiple radar sites per page. I could be wrong!
dang... I use four sites
.. hope you're wrong.. :grin:
Dennis
-
wow... mine just started working again...
(I've not changed anything yet)
wonder who did what??
Dennis
-
My app is working again with these changes. Good luck!
.. could you share a little more info about how you modified the original?
Thanks,
Dennis
Script I posted (JSON_generator.php) is not a rewrite of the scripts written by ELDoradoWx. His JavaScript scripts (see http://www.eldoradocountyweather.com/scripts/radar-on-google-maps.txt) make an AJAX call to JSON_generator.php on the www.srh.noaa.gov site. You pass it a parameter that says how many frames you want, and it returns the file names for those images, which are then plugged into <img> elements on your site and displayed.
The version on www.srh.noaa.gov stopped working, but you could still look at the file names manually. For example, to see a directory listing for the current NCR images for station ATX, just look at http://radar.weather.gov/ridge/RadarImg/NCR/ATX/ from your browser.
So what I did was write a server-side (PHP) program that accessed that URL. It takes the HTML of the directory listing that comes back and scrapes (parses) it to get the file names and returns them. So it gives the same result as the JSON_generator.php on www.srh.noaa.gov, but it works completely differently (I think, since I don't have the source of NOAA's version of JSON_generator.php). The only other difference is that it returns the files on the radar.weather.gov site, which seems to be more stable than the www.srh.noaa.gov site.
So if you are using one of ELDoradoWx's scripts on your site, what you need to do is the following. It is pretty simple actually:
1) Install my new JSON_generator.php program (and EasyWebFetch.php) on your site somewhere so you can call it. Let's say your site is "mysite.com" and you put these files in the directory "myradar".
2) Edit the script from ELDoradoWx and change any line similar to this:
var stub="http://www.srh.noaa.gov/ridge2/JSON_generator.php?callback=CallBack&frames="+Wrap;
to instead call the script on your site like this:
var stub="http://mysite.com/myradar/JSON_generator.php?callback=CallBack&frames="+Wrap;
The important part is to change the URL to access JSON_generator.php on your site instead of the non-working version on the NOAA site.
3) Also edit the script so that it accesses the image files on radar.weather.gov instead of www.srh.noaa.gov
For example, in the function "CallBack" the first line is:
var stub="http://www.srh.noaa.gov/";
Change that to
var stub="http://radar.weather.gov/";
In summary, drop two files on your server, edit two lines in ELDoradoWx's script. Now everything should work again.
If the NOAA website is working again, that's great, but you still might want to make these changes, since radar.weather.gov seems to be both faster and more stable than the NOAA site.
To answer DaculaWeather, my JSON_generator.php program only fetches one station at a time, exactly the same as NOAA's JSON_generator.php program. ELDoradoWx's script calls this multiple times if you want to display more than one weather station. It works exactly the same as before.
-
Good information, thanks! Yes, it appears it's all working again. But I have all the files now so in the future if it happens again, I can swap.
I have 24 different loops that I HATE to have to change it I don't have to. :-)
-
By the way, many people in here asked if ELDoradoWx was going to rewrite his radar animation script to run on Google Maps V3 (instead of V2). I did that, and was thinking about posting the new scripts here for other people to use.
But if NOAA is switching over to Ridge 2, perhaps I should wait until that is done.
Also, we are looking at alternatives to Google Maps for several reasons. First, Google is now charging for their maps (only for heavy users, but we are definitely a heavy user), and second since Google Maps is closed source, it is hard to add features to it that we need.
I've already rewritten one of our maps to use the open source Leaflet mapping software (from Cloudmade). One of the advantages of Leaflet is that you can get your map imagery from anywhere, and there are some really nice maps out there. MapQuest has some map servers that are free and have some really nice looking maps (based on OpenStreetMap data).
So I may write the Ridge 2 weather radar scripts using Leaflet. We'll see.
Wm Leler
Flightstats.com
[helpful links]
http://leaflet.cloudmade.com/
http://open.mapquest.com/
http://www.fubra.com/blog/2011/11/24/google-maps-free-alternatives/
http://blog.nestoria.co.uk/why-and-how-weve-switched-away-from-google-ma
-
I would be very interested.
-
Thank you... Very nice work.
A GM v3 version would be great..
..could add nice pop ups over the Nexrad for severe wx alerts etc.
Dennis
-
Dennis, the current code I wrote for GM V3 only includes those features I needed (I didn't need multiple radar stations, for example), and would need to be cleaned up and documented. I'm not sure if that is worth it to spend much more time on that code if I will just have to throw it away soon for Ridge 2. Not to mention if I'm moving away from GM.
I could probably get permission to send you the code as it is, so you can see what it looks like and adapt it to your needs. It isn't actually all that much code (90 lines).
-
I'd like to see it if possible.
I guess I do not understand all the implications of changing to Ridge 2.
.. I thought it should just be a matter of changing server/path/file names.
My application works on Android devices..
..it uses the current generation of wx scripts for GM v2 and geo location information from the phone to generate a nearest four sites view on the phone.
A virtual cell phone browser let's it all update as the user drives to provide dynamic updates..
..very near real time "follow me" nexrad depiction..
I've been unable to get it working on GM v3..
Thanks,
Dennis
-
I haven't looked at Ridge 2 in depth, but it seems like it will take more (maybe quite a bit more) than just changing servers.
I've written to NOAA to see if they have more technical information.
-
Hey! I resemble that!
-
I'm new to this and have been reading up on the projects discussed here. There is some really great work being done and want to thank those that have put so much into it so far. I have a question about this example:
http://www.eldoradocountyweather.com/radar/conus/conus-googlemap-radar.html
Is there a way to cause the page to open up to a zoomed & centered area of the midwest instead of the entire US? Is there a sample code that I could view?
Thanks again for some wonderful work!
-
Perhaps someone could help me out. What I'm seeing is that the animation speed specified in ridge.html isn't being honored unless I have the opacity set to 100%. At all other settings the speed is slow. Please have a look here:
http://mymishawakaweather.com/ridge.html
Thanks!
-
A few things...
1. You're loading a LOT of radar sites, it WILL be slow. I have a few that load 20 and yes, it is slow.
2. I would remove the opacity settings under the function Load() settings and see what happens.
-
Thanks for the suggestion and yes, that seems to have taken care of it. I think this issue might be hardware specific, and may not be as noticable on a higher-end system. I'll leave opacity under the function Load() settings out of the code. I wish there was a way to put the map labels over the radar echos but at the beginner level I can't begin to guess how.
-
Perhaps someone could help me out. What I'm seeing is that the animation speed specified in ridge.html isn't being honored unless I have the opacity set to 100%. At all other settings the speed is slow. Please have a look here:
http://mymishawakaweather.com/ridge.html
Thanks!
Golly, so much ground clutter.
-
Yea, that's another thing I wish we could address. If we could specify a color table or turn off cetain dbz returns it would be nice! That wouldn't eliminate the clutter but it sure would reduce it some.
-
The Google Maps API2 has been deprecated for about a year now. It is my understanding that Google stopped doing updates for it at about the same time. I think, needless to say, I no longer work with it or support API2 radar. I moved over to API3 ani radar quite some time ago and recommend that others consider doing the same.
-
Ok, enough is enough...
I have been working on this project for a few days, I really need the radar map located at
http://www.eldoradocountyweather.com/current/misc/google-maps-radar/us-mosiac-radar.html (http://www.eldoradocountyweather.com/current/misc/google-maps-radar/us-mosiac-radar.html)
I did start on the API v2, but you cant get a key any longer, I have been messing around with el dorado's source code, but I cannot get anything working.
So anybody have any directions to get that exact radar with the API v3 on my website
Thanks,
Weathermayhem
-
I have the API2 working fine, I was wondering if you could get severe warnings to display on there and to show county lines as well as add radars products such as echo tops and base velocity.
Thanks! :-)
-
Ok, enough is enough...
I have been working on this project for a few days, I really need the radar map located at
http://www.eldoradocountyweather.com/current/misc/google-maps-radar/us-mosiac-radar.html (http://www.eldoradocountyweather.com/current/misc/google-maps-radar/us-mosiac-radar.html)
I did start on the API v2, but you cant get a key any longer, I have been messing around with el dorado's source code, but I cannot get anything working.
So anybody have any directions to get that exact radar with the API v3 on my website
Thanks,
Weathermayhem
Thanks. I like how I got your page to center on Stillwater when I load it.
-
I read all the posts in this thread.
I have been working on getting a radar going on my weather site. I was able to get some parts of the v2 google maps radar that ELDoradoWx has going on my test server. But it seems that the v2 is going to expire in 2013 from Google. Sounds like I should get the v3 that he has but looking at the source I don't really understand what to do to get it going.
I also tried the scripts that wmleler posted (JSON_generator.php and EasyWebFetch.php) but it does not work. Maybe something has changed in those scripts since he did them?
Also I read that the NWS is going to change to something called ridge2?
So, I am just looking for suggestions as what might be best for me to do for this type of a weather radar map on my website?
Thanks,
Sperry
-
I'm still using those scripts and they should still work.
The NWS is upgrading to the new Ridge2, but I haven't had time to figure that out yet. If anyone has done it, I'd love some information on how to access the new weather images.
--wmleler
-
I've got to change all of mine over (23 of them), I'll start looking at Danny's tonight to see what I have to do and I'll let you know. Danny's new one is much more comprehensive than the old one and it involves many more scripts. It might take me more than a few nights to work through it.
-
I finally got the script going that wmleler wrote.
I looked up who Danny was and assume that you were talking about ElDoradoWx script for the v3 google maps? If so I will watch out for what you find out.
Sperry
-
By the way, Flightstats (where I work) has switched away from the Google Maps API and is now using Leaflet. We are very happy with Leaflet. You can read more about this in our developer blog:
http://devblog.flightstats.com/2012/07/switching-mapping-apis.html
There is also an entry about switching to open source solutions:
http://devblog.flightstats.com/2012/07/wm-leler-talks-about-moving-away-from.html
Wm Leler
-
I read those links. I think that the v3 google maps radar of ElDoradoWx incorporate Openstreets. I don't necessarily have to have google maps. Openstreets seem fine to me for the use of weather Radar. I just need to figure out how to get these things to work. I am not a programmer although I have dabbled in different languages slightly. Usually I try to find out how to use a script or code and modify it for myself at which I don't always succeed. :-)
Thanks.
Sperry
-
My Google maps radar pg stopped working a couple of days ago. http://k4kmgweather.com/google-radar.php
Any idea what's going on? NWS issue? Google? Is this just a consequence of the changes being made at both places?
Thanks
Tom
-
Our weather radar stopped working a few days ago as well. The problem was the PHP script that returns the file names for the radar images -- it started returning bad names (missing the timestamp). I reverse engineered the script, ran it on my own server, and now everything is working again.
You can grab my script from http://demo.flightstats-ops.com/NWS/JSON_generator.py
It is in Python rather than PHP. I have a PHP version too, but it is more complicated to install. To use the PHP version, download http://demo.flightstats-ops.com/NWS/JSON_generator.php and http://demo.flightstats-ops.com/NWS/EasyWebFetch.php
Put either the Python or PHP version on your server, and change the URL that calls this script in you site, and everything should be working again.
Note that I think the NWS is starting to switch over to Ridge2 radar, which is why things are starting to break with the old (Ridge) radar. Hopefully someone will figure out how to use Ridge2 soon (maybe even me if I find the time).
-
Thanks. Got the python ver. So I change this:?
http://www.srh.noaa.gov/ridge2/JSON_generator.php?callback=CallBack&frames=
To;?
-
You're using ridge2 data, not ridge? I think mine is for ridge, but you can try it.
Just change the URL (everything up to the "?") to point to wherever you put your script on your server.
Gotta run, leaving town. Back Monday.
-
Thanks but didn't work. No worries.
Tom
-
My National Weather Service Radar is not overlaying correctly. The
webpage is http://156.42.96.39/alert/Google/radar.html. I have had
this working on the webpage for over two years and two days ago it was
working fine. Yesterday I noticed the problem. When you open the
webpage the last 10 gif radar images from the Phx are supposed to
overlay and loop. The images are coming from http://radar.weather.gov/ridge/RadarImg/NCR/IWA/
and the map isn't grabbing the time step on file name correctly. IE
the latest image should be http://radar.weather.gov/ridge/RadarImg/NCR/IWA/IWA_20120907_1217_NCR..gif
and on the Google Map at the very bottom the url is supposed to be the
same thing and it is http://radar.weather.gov/ridge/RadarImg/NCR/IWA/IWA_20120907__NCR.gif.
Does anyone have any ideas or suggestions on how to get the radar working? Thanks.
-
My radar map will not work either - it had been fine up until a few days ago.
Does anyone have any ideas as to what happened?
Bob Ingoglia
http://heightsweather.info
-
My radar map will not work either - it had been fine up until a few days ago.
I was having the same problem. Go back to page 9 in this topic about 6 entries down to the response by wmleler. I just finished following his instructions and my radar is now working great.
Steve
-
Steve,
Thanks - you are correct - it works perfectly! Thank you.
Bob
-
Glad to be of assistance!
-
Yep... none of mine work now either. I hate having to create a separate page for each radar. The more I think about it the more I believe that Danny's solution, while more complex, will be more beneficial.
-
I have still been unsuccessful at getting my radar working.
I have tried the fix from wmleler. I have the JSON_generator.php and EasyWebFetch.php on my webserver and have changed the two lines in ELDoradoWx's scripts to as suggested. I have the JSON_generator.php file to just get Phoenix radar. My map is at http://156.42.96.39/alert/Google/radar.html and ELDoradoWx's script is at http://156.42.96.39/alert/Google/nws_radar_test_revised.js and the php files are in http://156.42.96.39/alert/Google/php/.
DaculaWeather what is Danny's solution? My my map (when it was working) allows you to add up to 5 radars at one time.
Any suggestions?
-
Danny (EldoradoWX) is now using a totally different script. It involves multiple scripts and adds additional layers of complexity that the old script doesn't have.
I'll have to start working on that tonight since none of my 23 or so Google radars are now working.
-
Some people have had some problems downloading my files without them getting corrupted. In particular, the files Chandra uploaded seem to be corrupted or empty. Not sure what the problem could be, but I've zipped up all three of them and attached them to this posting.
Please let me know if this works. Remember, you only need either the single python file, or the two php files.
--wm
-
I saved and unzipped them and I am still not able to get the radar to work. I tried using both .php files and then just the .py file. I have changed the file names within my .js and the radar names within the .php file. I am just trying to get the radar NCR (Composite Ref.) working for IWA (Phoenix).
Here is my map http://156.42.96.39/alert/Google/rain.html.
I am getting this error message:
Message: Expected ';'
Line: 1
Char: 9
Code: 0
URI: http://156.42.96.39/alert/Google/php/JSON_generator.php?callback=CallBack&frames=10&rid=IWA&product=NCR&random=7988470934
This line of code is from the JavaScript file http://156.42.96.39/alert/Google/nws_radar_test_revised.js. My php files are located at http://156.42.96.39/alert/Google/php/EasyWebFetch.php and http://156.42.96.39/alert/Google/php/JSON_generator.php. Is there any way I might need to edit proxy settings withing the EasyWebFetch.php file?
Thanks
-
When I try to invoke your PHP file, I get a hung browser and then "Unknown error". There must be some reason your server isn't executing the PHP file.
You should be able to invoke the PHP file directly, like this (on my personal server):
http://zat.com/flightstats/NWS/JSON_generator.php?rid=IWA
Drop that URL into a browser and you can see the output for IWA (Phoenix).
You should be able to get the same response on your server. If you can't, then something is not configured properly. Ask your hosting provider how to get PHP files to execute.
-
Finally. I've got all of Danny's code working (almost) with the Google v3 stuff
http://www.daculaweather.com/current/misc/google-maps-radar/4_google_radar.php
What I don't have working is the preset radar views (I have no idea how it loads the settings for those unless their are some files I can't see).
It's a PITA because of the complexity of the code. IT didn't want to validate (and probably still doesn't) and I had to fix some quotes, things like <br /> instead of <br> etc. Lots of css tweaks to make it fit my page etc.
There are also some js files that are called by one of the scripts that loads that you can see. It was kind of a pain to track those down too.
I emailed Danny but I doubt seriously that he'll respond.
Just a caution for those that want to try this, is not for the faint of heart. I could write a small book about all the things I had to do and I would probably leave something out, so I won't be much help. Because there are so many things that could go wrong, trying to troubleshoot reverse engineering issues will be a PITA.
-
wmleler - the Phoenix Composite Radar is overlaying on my maps now! Yay! I had to edit EasyWebFetch line 40-44 with my proxy settings to get out of the county network. I was running into a firewall. Thank you so much for your help and suggestions.
One more question to you, it seems as though this script will only overlay one radar and one product. Is there any way to have multiple products and radars pull data from this JSON_generator.php file?
FYI for everyone - We work very closely with NWS so I called and talked with SRH's about the http://www.srh.noaa.gov/ridge2/JSON_generator.php file. The JSON_generator.php file was was only running at SRH, and the server that it was running on was recently taken down. They have a ticket in with NIDS (National Weather Service Information Dissemination System) to implement this script nationally, but are unsure of a timeline.
-
The government moves very slowly. Good luck on having it back up anytime soon.
-
I wrote my JSON_generator.php to exactly simulate the one at the NWS site, so that it could be used by any script without change. Most scripts call it multiple times if they want to display multiple products or radar stations. But, it would not be difficult to modify the script if you wanted to.
Actually, here at Flightstats we are moving away from using this script. Its only purpose is to let you know what the file names are, so you can insert them into the HTML img tags. Instead, we are setting up a proxy on our site so that we can read the directories from the client (using JavaScript) without running into the dreaded "same origin policy" problem.
By the way, if you are working closely with the NWS I would love to have more information about Ridge2 radar. I have not been able to find much information on how to access the image files. I wrote to them but received no response. If you have that information (or can get it) and send it to me (or post it here), I will write JavaScript to access it and will be glad to share it in here.
Questions would be:
Is Ridge2 ready to be used by people like us?
How do we access the image files?
Are there other ways to access the images, like a tile server or other server?
Is there any sample code they can provide that accesses the new Ridge2 radar?
Is there any documentation on what is available?
Thanks!
-
I found a link to the images but it doesn't help me figure out how to really access them. Here's one:
http://radarcache.srh.noaa.gov/tc/tc.py/1.0.0/ridge::NAT-N0Q-201209131710/4/3/6.png
-
I have all 5 radars and 7 products displaying on my map correctly. Just a little more editing to JSON_generator.php. Thank you so much for your help wmleler.
I have emailed my contact at SRH about the questions you listed below. I have also included the link you found DaculaWeather.
I will let you know when I get a response from NOAA.
-
Chandra,
I tried looking at your site to see how you got it working..
(to try and get mine working)
.. but I don't see that yours is working...
here?
http://156.42.96.39/alert/Google/radar.html
thanks,
wingwing
wmleler - the Phoenix Composite Radar is overlaying on my maps now! Yay! I had to edit EasyWebFetch line 40-44 with my proxy settings to get out of the county network. I was running into a firewall. Thank you so much for your help and suggestions.
One more question to you, it seems as though this script will only overlay one radar and one product. Is there any way to have multiple products and radars pull data from this JSON_generator.php file?
FYI for everyone - We work very closely with NWS so I called and talked with SRH's about the http://www.srh.noaa.gov/ridge2/JSON_generator.php file. The JSON_generator.php file was was only running at SRH, and the server that it was running on was recently taken down. They have a ticket in with NIDS (National Weather Service Information Dissemination System) to implement this script nationally, but are unsure of a timeline.
-
Well that is frustrating, when I left work yesterday it was working great. I had edited the JSON_generator.php file to overlay all five radars with seven different products available to overlay. I had to edit lines 40-44 in EasyWebFetch and add my proxy settings. It wasn’t changing the transparency but that was the only thing that i needed to work on. That is the correct link to the Radar Map, the NWS Radar tab is also on my rainfall map at http://156.42.96.39/alert/Google/rain.html. I will start working on it again...
Haven’t heard back from NOAA yet...
-
I believe I have a cache problem...
When if invoke the PHP file separately at http://156.42.96.39/alert/Google/php/JSON_generator.php?rid=IWA my radar images are from yesterday (9/13). I am not able to get the most recent images. I have added the no cache headers
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
header("Cache-Control: no-cache");
header("Pragma: no-cache");
to my JSON_generator.php file but that isn’t doing the trick. The error is happening today because my php file is trying to pull images from 9/13 and they are no longer in the http://radar.weather.gov/ridge/RadarImg/NCR/IWA/ directory. Any one else had this problem? Any suggestions?
-
Tried both the php solution and the py solution.
..changed the image sever to radar.weather
No joy...still not working.
I'm not sure if my godaddy host supports php or py
...is there anyway to test that?
..or can someone share the path for their php script that I could use for testing to determine if that is what the problem is?
I'm on a road trip and trying to make these changes with my smart phone..grrr
..my kingdom for a netbook..:-)
Dennis
-
i know this morning the southern region nws site was down, not sure if that's any of your problem or not. its still down
-
i know this morning the southern region nws site was down, not sure if that's any of your problem or not. its still down
...I'm not sure what the problem is...
The radar.weather site seems to be displaying their own offering ok..
http://radar.weather.gov/radar.php?rid=GSP&product=NCR&overlay=11101111&loop=yes
Dennis
-
..still trying..no joy
anyone have a simple site working using the py solution?
..I sure would like to see it.
Thanks,
Dennis
-
..anyone found a solution?
....getting desperate here
Dennis
-
Any news on how to make this work again #-o
Tried everything I can think of and it's still a no go
-
Wayne,
Have you followed the instructions wmleler gave on page 9 of this topic about 6 items from the top exactly? One step of his 'fix' involves downloading his customized version of json_generator.php and uploading it to your own website (he provides the code for that file on page 8 in an item near the bottom of page 8). When I look at the source for your radar page, it appears you're still calling json_generator.php from www.srh.noaa.gov, not from the customized version on your own site.
Steve
-
Thanks Steve,
I am still calling that file remotely,so that is probably the fault.
I will reread that post and find out what I omitted and hopefully get back on the air with this.
Thanks again
-
Working like a dream currently http://www.smythweather.net/google-radar/geo-ridge.php
Thanks for the help and suggestions !
-
This was great help, mine quit working sometime ago. Made the changes documented here and back up and working perfectly http://www.stetsonweather.com/wxnradar.php (http://www.stetsonweather.com/wxnradar.php). Thanks to all who did the coding work!
Todd
-
Wmleler and DaculaWeather - Here is the response I got from NWS about Ridge 2 products.
Q1: Is Ridge2 ready to be used by the public? Is there any sample code they can provide that accesses the new Ridge2 radar?
A1: Ridge is still in experimental mode. Though that means it's available to the public, things will likely still change. So, do consider that as you're writing any code.
Q2: How do we access the Ridge2 image files? I have found this link http://radarcache.srh.noaa.gov/tc/tc.py/1.0.0/ridge::NAT-N0Q-201209131710/4/3/6.png but it doesn't help me figure out how to really access them.
A2: The URL you give above, is the address to part of a radar image as served by a tile server. The last 3 integers indicate its position in the google grid (left, right, zoom, essentially).
Q3: Are there other ways to access the images, like a tile server or other server? Is there any documentation on what is available?
A3: Though it's not well-documented at this state in development, the js in the page (which is you can see pretty easily in the directory: http://www.srh.noaa.gov/ridge2/ridgenew2/js/)
They also said "once Ridge2 becomes the official radar Ridge (one) images on http://radar.weather.gov/ridge/RadarImg/ will remain up and running for a couple of years".
-
So if you are using one of ELDoradoWx's scripts on your site, what you need to do is the following. It is pretty simple actually:
(...)
In summary, drop two files on your server, edit two lines in ELDoradoWx's script. Now everything should work again.
I use one of the original writes of this radar script and just noticed I had no radars last week. Followed you instructs, using the two files you linked to, and all is well.
Thank you much for your time and effort with this.
-
Can't seem to get anything working with my radar now days. I'm lost. Too many posts, too may scripts, calls, this that and the other. How do I start over form scratch and make a radar work for middle TN?
-
I too have not checked my radar on google map for sometime. I did today and no radar showing on map. It appears something changed. When I go to the link for the latest information on the application it no longer exist. Only information is for the flanis version. Nothing about Google. What happen and how can I get it going again.
-
I too have not checked my radar on google map for sometime. I did today and no radar showing on map. It appears something changed. When I go to the link for the latest information on the application it no longer exist. Only information is for the flanis version. Nothing about Google. What happen and how can I get it going again.
TnWxMan,
Have you followed the instructions wmleler gave on page 9 of this topic about 6 items from the top? One step of his 'fix' involves downloading his customized version of json_generator.php and uploading it to your own website (he provides the code for that file on page 8 in an item near the bottom of page Cool. When I look at the source for your radar page, it appears you're still calling json_generator.php from www.srh.noaa.gov, not from the customized version on your own site. If you'll follow wmleler's instructions exactly, I believe you'll see your radar show up again.
Steve
-
I'm confused as to which ELDoradoWx's scripts I should be using in the first place.
-
Well, guess I'm getting closer but when I hit the page... I have a valid key and it's in the code. ????
Google has disabled use of the Maps API for this application. The provided key is not a valid Google API Key, or it is not authorized for the Google Maps Javascript API v2 on this site. If you are the owner of this application, you can learn about obtaining a valid key here: http://code.google.com/apis/maps/documentation/javascript/v2/introduction.html#Obtaining_Key
-
I don't think you can get a key for the old API anymore.
-
I guess that goes back to my org question, what code on my web page should I be using to make this all work? What have I missed?
-
Hi Steve,
Thanks. I have downloaded the files and working on it now. I appreciate the help.
Bob (TNWXMAN)
P.S. Just got it back up and running. This is great, thanks.
-
Just updated one of my pages... it looks like to me that it's loading all the sites that I loaded before, in other words, it loads multiple radar sites. I thought I was going to have to only load one site and that's why I put it off for so long! YEA! Now I can get all of my Google radars going again!
Georgia working again - http://www.daculaweather.com/4_ridge_georgia.php
-
Looks nice Steve. I just don't care for all the ground clutter on the google maps.
-
It would be nice to filter it out. On my GRLevel3 I created my own color tables to not display anything less than a certain dbz which gets rid of most of the clutter.
-
Hey Steve, great looking radar! One thing though, and this could be IE9 or something, but I cannot get your opacity to work. I click the button to change the percentage and it dosen't do anything to affect the radar image.
-
It works with FF 16
-
Yeah I wasn't trying to give you a hard time Steve, I just thought you might want to know, I mean I think your site is among the very best here on the forum :-) :-)
-
I think it has to do with IE. Seems like someone else mentioned that somewhere else here.
And thanks Fitz! I truly appreciate that!
-
No problem! I think I am going to try and recreate this radar again myself 8-)
-
It took me all of 20 minutes or so to update 23 radars. Not bad.
-
It would be nice to filter it out. On my GRLevel3 I created my own color tables to not display anything less than a certain dbz which gets rid of most of the clutter.
..could you provide more info about doing that?
..would love to able to filter out the morning fog in Florida.
Dennis
-
When I get home I'll get a copy of the color table I did so you can see how it's done. The color tables are very easy to work with and modify.
-
Could someone show me where the actual download for the radar is? I downloaded it one time before but I lost it when I wiped the com out and now I cant find it
-
You mean the images?
-
Yeah I'm talking about the files themselves, like one was ridge.html, and there was like 2 more
-
I guess I'm not understanding.
Are you talking about a web page or are you talking about the individual images for the radar loops?
-
Yeah I'm talking about the files themselves, like one was ridge.html, and there was like 2 more
I simply go with this for the national version: http://radar.weather.gov/Conus/full_loop.php
-
I believe so.
-
Maybe send a message to Danny at ELDoradoWx seeing as though he originally created this script.
-
I had him do that last night.
-
Sorry about that guys.
-
I am totally confused. I would like to add a radar page to my site which is using my modified version of the Cumulus standard site. http://harwichweather.com (http://harwichweather.com). I have read this thread about 20 times. I have not downloaded any files yet because I don't know what I should download. For instance, I see I need ridge.js and radar.js....where are those? If someone would be kind enough to give me a quick jumpstart, I would be very grateful.
Stan
-
This is an old thread..
..the map code is written in Google Maps API v2 which is depreciated and scheduled to be turned off very soon..
(end of March I think)
..no sense in spending much time with this unless you just want to learn..
.. the code will not work too much longer..
Dennus
I am totally confused. I would like to add a radar page to my site which is using my modified version of the Cumulus standard site. http://harwichweather.com (http://harwichweather.com). I have read this thread about 20 times. I have not downloaded any files yet because I don't know what I should download. For instance, I see I need ridge.js and radar.js....where are those? If someone would be kind enough to give me a quick jumpstart, I would be very grateful.
Stan
-
I realize this an old thread but I remember reading, I believe from the original author, that even though API v2, will be deprecated, that you should upgrade to API v3. I see all these sites still running the radar pages, so what happens to them? I find it hard to believe with all these smart people on this board and elsewhere that overlaying NOAA radar on Google Maps is not possible. I have no idea how to do it, but I am great at cut and paste :lol:
-
OK guys... you might be ok with your radar scripts if you're using v2. All of my scripts are still working, and it appears may continue working. Assuming they are already sending the wrapped version, we may be fine.
Note: The Google Maps JavaScript API Version 2 was officially deprecated on May 19, 2010. The original deprecation period has been extended from May 19, 2013 until November 19, 2013. As of this date, all applications requesting v2 will be served a special, wrapped version of the v3 API instead. We expect this wrapped version of the API will work for most simple maps, but we strongly encourage you to migrate your code to version 3 of the Maps JavaScript API before this date.
-
where do i get these at???
2. Before the applet code you will see "form" code. You need to put the url links to your other radar types here. Put each radar type URL into the code where it says:
link-to-br1-radar-goes-here
link-to-cr-radar-goes-here
link-to-cr248-radar-goes-here
link-to-br248-radar-goes-here
link-to-ohr-radar-goes-here
link-to-thr-radar-goes-here
link-to-shr-radar-goes-here
-
ok hate to double post but i have no idea what im doing with this i've read the instructions and so far all i got is http://www.gosportwx.com/grlevel3.php .. hopin someone can help me! thanks
-
Anyone notice the radar not working today? Not sure if this is a temporary outage or something bigger.
Todd
-
Someone is apparently having DNS issues:
Service Unavailable - DNS failure
The server is temporarily unable to service your request. Please try again later.
Reference #11.5f1c973f.1377201205.286e50ea
-
Also having issues with ridgewms.srh.noaa.gov for Level II images. It's been very slow.
-
Level III data working again.
-
It looks like the NWS alerts aren't working. I get an image error in Chrome on the Daculaweather map: http://www.daculaweather.com/current/misc/google-maps-radar/4_google_radar.php and my own: http://somas.stonybrook.edu/~RTDS/pages/gmapradar.php
Anyone else seeing this problem? Some of our researchers here have noticed other issues with NOAA/NCAR/NWS data lately not being updated, so hopefully it isn't all connected...
-
That particular link was an experimental version and has apparently disappeared or changed. The other checkbox (Weather Alerts) still continues to work. I'll look into that and see if I can figure out what changed. I like using the new interactive EDD page, tons of different layers to display.
http://www.daculaweather.com/4_nws_edd.php
-
Steve,
That page doesn't render right in Firefox, runs off the edges of my monitor, scroll bars can't get it back on the screen to see the extreme left and right of the page. :shock: #-o Might need a small tweak. ;)
George
-
Steve,
That page doesn't render right in Firefox, runs off the edges of my monitor, scroll bars can't get it back on the screen to see the extreme left and right of the page. :shock: #-o Might need a small tweak. ;)
George
Works fine on Chrome and FF for me.
Judging from your screen name, however, it might be the OS. I run Linux at home as well and sometimes certain pages won't render correctly. FF 23.0.1 runs great on that page under Windows 7. As well as Chrome 29.
-
Yes, when I did my initial testing of my new design, I used IE, Chrome, and Firefox to test with and it was ok. Not to say something hasn't gotten messed up somewhere but... :-)
-
I almost commented earlier, Steve, that that's the only page of yours that's wider than your template, but deleted it as superfluous. It views just fine here in Chrome and FF. With your dropdown menus you have your entire page width and then some available for the iframe. I tried several months ago to iframe that page, but gave up because the Saratoga-Wx template I use just doesn't provide enough space to the right of the menubar. I just put a link on my menu to the NWS page. I agree it's fun to play with!
-
The EDD is definitely nice, although it takes the fun out of tweaks you can do the other set of maps :-p
I am having similar problems with the EDD rendering on your site with Chrome. It is flowing out of your template, but not off the screen--like gwwilk mentioned, it doesn't affect the experience at all.
Thanks for following up!
-
Well here's a screen cap from FF22 just taken a few minutes ago, my screen 1152 by 864 32bit High color Windows XP SP3.
The menu spills off the left of my screen, even with the horizontal scroll bar full left as in in the screen cap.
George
-
That is correct, the EDD div is 1200px and the container div is 1000px, it is 200px wider than the container... on purpose. I wanted people to have the maximum view (within reason) of the EDD.
-
Jerry... I just got back from Lincoln last Saturday (17 hour drive straight through to my house!). I was at the SCCA Solo National Championships at the Lincoln Airport (west side).
http://www.wxforum.net/index.php?topic=20181.0
-
Looks like I will be switching my site over to the EDD. ElDoradoWeather's webmaster is sending out cease and desist orders for the Google Maps Radar script. If you haven't received yours yet, Steve, perhaps you are lucky!
-
Danny is a man of his word and strong convictions, and I know he'll do what he knows is right.
Danny spends countless hours creating these maps, and if it were me, I would not be happy if someone just took my work. I've had people pilfer ideas from my site without asking (yes, I know who many of you are) and it almost makes me NOT want to post new pages up here because of it.
The EDD is nice in that it plays well in iframes. Whatever size frame you have, it fits to it. Now... the real question is will that page still work the same way once it's not experimental anymore. I guess I need to email Jonathan again and see if he knows.
-
Danny is a man of his word and strong convictions, and I know he'll do what he knows is right.
Danny spends countless hours creating these maps, and if it were me, I would not be happy if someone just took my work. I've had people pilfer ideas from my site without asking (yes, I know who many of you are) and it almost makes me NOT want to post new pages up here because of it.
I definitely understand the work that goes into all web design, and appreciate all of the efforts. Without the talent of you and Danny and others, it would take much longer to get websites related to weather off of the ground, and the quality wouldn't be what we are seeing today.
That said, I don't think we can operate in a dual environment where some scripts are free and others are not. Either stop releasing content completely and keep the code to yourself or make EVERYTHING open.
Anyway, enough ranting. On to the EDD!
-
Is the Moasic Google Map script available?
http://www.eldoradocountyweather.com/current/misc/google-maps-radar/OSM-AniRadar/osm-ani-radar.php
I didn't see it on your downloads page.
Thanks!
-
No...
-
No...
Not a particularly friendly response...
I went back and read through the rest of the thread and I see that the guy at Eldorado has issues.
Thanks!
-
There wasn't much to say except no. Danny is NOT sharing his code with anyone.
-
Maybe locking this discussion would be good then.
-
And unsticky.