|
CNYWeather
|
 |
« Reply #75 on: September 11, 2010, 07:56:16 AM » |
|
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? 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.
|
|
|
|
|
Logged
|
|
|
|
|
Cienega32
|
 |
« Reply #76 on: September 11, 2010, 03:26:19 PM » |
|
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?  Thanks for your patience & assistance and, of course, the great script!
|
|
|
|
« Last Edit: September 11, 2010, 05:46:56 PM by Cienega32 »
|
Logged
|
|
|
|
ELDoradoWx
El Dorado Weather
Senior Contributor
  
Offline
Posts: 290
Gentoo X = Complete_Control
|
 |
« Reply #77 on: September 11, 2010, 04:12:36 PM » |
|
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.jshttp://www.eldoradocountyweather.com/current/misc/google-maps/tyx/ridge.jsI 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..
|
|
|
|
« Last Edit: September 11, 2010, 04:34:24 PM by ELDoradoWx »
|
Logged
|
-Danny -root is everything 
|
|
|
ELDoradoWx
El Dorado Weather
Senior Contributor
  
Offline
Posts: 290
Gentoo X = Complete_Control
|
 |
« Reply #78 on: September 11, 2010, 04:15:58 PM » |
|
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?  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.
|
|
|
|
« Last Edit: September 11, 2010, 04:20:42 PM by ELDoradoWx »
|
Logged
|
-Danny -root is everything 
|
|
|
|
Cienega32
|
 |
« Reply #79 on: September 11, 2010, 06:08:17 PM » |
|
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"  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 ->  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  . That last Mexican Hurricane had me looking for it tho' and renewed my interest.
|
|
|
|
|
Logged
|
|
|
|
ELDoradoWx
El Dorado Weather
Senior Contributor
  
Offline
Posts: 290
Gentoo X = Complete_Control
|
 |
« Reply #80 on: September 11, 2010, 06:57:14 PM » |
|
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! 
|
|
|
|
|
Logged
|
-Danny -root is everything 
|
|
|
|
CNYWeather
|
 |
« Reply #81 on: September 12, 2010, 07:47:13 AM » |
|
Thanks for the help Danny. Got it all squared away. Tony 
|
|
|
|
|
Logged
|
|
|
|
|
LeomaTNWX
|
 |
« Reply #82 on: September 12, 2010, 11:36:39 PM » |
|
Here is the link to my page. Map looks great just no radar. Could someone give it a look please? www.leomaweather.com/ridge.htmlAlso 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( ;"> 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>
|
|
|
|
|
Logged
|
|
|
|
|
Cienega32
|
 |
« Reply #83 on: September 13, 2010, 12:54:12 AM » |
|
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.
|
|
|
|
|
Logged
|
|
|
|
ELDoradoWx
El Dorado Weather
Senior Contributor
  
Offline
Posts: 290
Gentoo X = Complete_Control
|
 |
« Reply #84 on: September 13, 2010, 12:55:27 AM » |
|
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; } }
|
|
|
|
« Last Edit: September 13, 2010, 02:50:39 PM by ELDoradoWx »
|
Logged
|
-Danny -root is everything 
|
|
|
|
LeomaTNWX
|
 |
« Reply #85 on: September 13, 2010, 11:01:45 AM » |
|
Thanks!!! I forgot to look at those files. I figured I messed up somewhere in the html file. Thanks again.
|
|
|
|
|
Logged
|
|
|
|
branmh
Member
Offline
Posts: 1
|
 |
« Reply #86 on: September 16, 2010, 10:05:14 PM » |
|
Great Script was able to get working in no time, but is there away to add warnings?
|
|
|
|
|
Logged
|
|
|
|
ELDoradoWx
El Dorado Weather
Senior Contributor
  
Offline
Posts: 290
Gentoo X = Complete_Control
|
 |
« Reply #87 on: September 18, 2010, 03:35:21 PM » |
|
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.
|
|
|
|
« Last Edit: September 18, 2010, 03:37:05 PM by ELDoradoWx »
|
Logged
|
-Danny -root is everything 
|
|
|
|
|
ELDoradoWx
El Dorado Weather
Senior Contributor
  
Offline
Posts: 290
Gentoo X = Complete_Control
|
 |
« Reply #89 on: September 21, 2010, 12:46:03 AM » |
|
Lookin' good Steve, nicely done. Are you getting the data from, WD and testtags.php or VWS?
|
|
|
|
|
Logged
|
-Danny -root is everything 
|
|
|
|
DaculaWeather
|
 |
« Reply #90 on: September 21, 2010, 06:19:00 AM » |
|
Thanks. WD.
|
|
|
|
|
Logged
|
Steve Davis Vue, VWS, WDisplay, VVP, StartWatch CWOP  
|
|
|
|
jay_hoehn
|
 |
« Reply #91 on: September 21, 2010, 11:22:24 AM » |
|
Is there a way to pull this from VWS? What file would I use?
Jay
|
|
|
|
|
Logged
|
Davis Vantage Pro2 Plus VVP VWS VP Live Cumulus WeatherFlash Image Salsa Movie Salsa 
|
|
|
|
DaculaWeather
|
 |
« Reply #92 on: September 21, 2010, 11:33:45 AM » |
|
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.
|
|
|
|
|
Logged
|
Steve Davis Vue, VWS, WDisplay, VVP, StartWatch CWOP  
|
|
|
|
jay_hoehn
|
 |
« Reply #93 on: September 21, 2010, 12:25:39 PM » |
|
Thanks, Steve. I do have AJAX updating my site if that helps.
Jay
|
|
|
|
|
Logged
|
Davis Vantage Pro2 Plus VVP VWS VP Live Cumulus WeatherFlash Image Salsa Movie Salsa 
|
|
|
|
Cienega32
|
 |
« Reply #94 on: September 23, 2010, 02:22:15 AM » |
|
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:  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!  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
|
|
|
|
« Last Edit: September 24, 2010, 09:36:02 PM by Cienega32 »
|
Logged
|
|
|
|
|
DaculaWeather
|
 |
« Reply #95 on: September 23, 2010, 06:00:01 AM » |
|
Very nice. How did you make it start with the bubble open on alarms?
|
|
|
|
|
Logged
|
Steve Davis Vue, VWS, WDisplay, VVP, StartWatch CWOP  
|
|
|
|
Cienega32
|
 |
« Reply #96 on: September 23, 2010, 09:57:44 PM » |
|
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  ), 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.
|
|
|
|
|
Logged
|
|
|
|
subh
Member
Offline
Posts: 4
|
 |
« Reply #97 on: September 24, 2010, 12:47:17 PM » |
|
|
|
|
|
« Last Edit: September 24, 2010, 12:49:10 PM by subh »
|
Logged
|
|
|
|
|
DaculaWeather
|
 |
« Reply #98 on: September 24, 2010, 12:49:37 PM » |
|
Danny? 
|
|
|
|
|
Logged
|
Steve Davis Vue, VWS, WDisplay, VVP, StartWatch CWOP  
|
|
|
ELDoradoWx
El Dorado Weather
Senior Contributor
  
Offline
Posts: 290
Gentoo X = Complete_Control
|
 |
« Reply #99 on: September 24, 2010, 11:43:06 PM » |
|
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=89911f843ef2e1c69d0273889005ad24I 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.htmlClimate: http://www.eldoradocountyweather.com/climate/brazil/brazil-city-climate-listings-a-z.htmlCurrent Conditions Temperature: http://www.eldoradocountyweather.com/forecast/southamerica/southamericatemps.htmlCurrent Conditions Dew Point: http://www.eldoradocountyweather.com/forecast/southamerica/southamericadew.htmlCurrent Conditions Heat Index: http://www.eldoradocountyweather.com/forecast/southamerica/southamericaheat.htmlCurrent Conditions Humidity: http://www.eldoradocountyweather.com/forecast/southamerica/southamericahumidity.htmlCurrent Conditions Pressure: http://www.eldoradocountyweather.com/forecast/southamerica/southamericapressure.htmlCurrent Conditions Wind Speed: http://www.eldoradocountyweather.com/forecast/southamerica/southamericawindspeed.html6 Day Precipitation Forecast: http://www.eldoradocountyweather.com/forecast/world-forecasts/world-day1-rainfall-forecast.htmlInfra Red Satellite: http://www.eldoradocountyweather.com/current/satellite/south-america-ir-satellite-loop.htmlSatellite Visible Satellite: http://www.eldoradocountyweather.com/current/satellite/south-america-vis-satellite-loop.htmlSatellite Water Vapor Satellite: http://www.eldoradocountyweather.com/current/satellite/south-america-wv-satellite-loop.htmlColor Infra Red Satellite: http://www.eldoradocountyweather.com/satellite/misc/s.america-ir-sat.html
|
|
|
|
« Last Edit: September 25, 2010, 12:56:43 AM by ELDoradoWx »
|
Logged
|
-Danny -root is everything 
|
|
|
|