WXforum.net

Web Weather => Weather Website PHP/AJAX scripting => Topic started by: saratogaWX on January 09, 2008, 04:35:39 PM

Title: New Carterlake-style Wunderground USA Radar/Maps PHP script
Post by: saratogaWX on January 09, 2008, 04:35:39 PM
I know many of you have tried and configured Tom's (carterlake (http://www.carterlake.org/)) USA Wunderground Radar/Maps script and have probably taken a fair amount of time and editing to adapt it to work on your website.  This new script builds on Tom's work, and also the enhancements by Jim at Juneau County Weather (http://jcweather.us/) to add additional maps.  The script still works only for the lower-48 USA states as Wunderground hasn't yet provided the similar maps/graphics for Alaska, Hawaii, or US Territories (or non-USA locations) :(

What I've added is code to allow easy setup for the radar/map locations, and a built-in setup JavaScript that will help you position the red-dot and city name over the nine different map types displayed by the script.  With this script, setup is probably a matter of less than 15 minutes.

My great thanks to Tom (for starting the whole thing with his original script) and to Jim (for his enhancements and testing of my mods).

I hope you'll enjoy using the new version of the script on your website.

Demo, instructions and download at http://saratoga-weather.org/scripts-WUradar.php#WUradar

Best regards,
Ken
Title: Re: New Carterlake-style Wunderground USA Radar/Maps PHP script
Post by: Hfcomms on January 09, 2008, 07:28:54 PM
I made mention of it on the other forum but another outstanding script and all the enhancements from the earlier version make it worthwhile to update.  Only took about 20 minutes or so to update.  With the previous version it took me about 2 hours to get the pixels for the city location to show up right.  Great improvement with the addition of extra maps.  http://www.bigbaywx.com/wx3.php

Thanks Again,
Ken
Title: Re: New Carterlake-style Wunderground USA Radar/Maps PHP script
Post by: saratogaWX on January 09, 2008, 08:20:14 PM
Thanks!  :grin:

Some folks have had issues with display of the red-dot/city name overlay on their pages when viewed with IE.

Some digging around has shown that all attempts to center the included script display will cause the problem in IE.

You can't use <center></center>,  you can't use <div align="center"></div> and I've even tried
Code: [Select]
    <div id="main-copy">
<table width="100%" style="border: none">
<tr>
<td align="center" style="background-color:#000000;color:#FFFFFF">
<?php include("WU-radar-inc.php"); ?>
</td>
</tr>
</table>
    </div>

and it doesn't work.

You need to have (in the Carterlake/AJAX templates), just
Code: [Select]
    <div id="main-copy" style="background-color:#000000;color:#FFFFFF">
       <?php include("WU-radar-inc.php"); ?>
    </div>
to have it left-aligned and the floating red-dot appear in the proper place in IE7.

My test page: http://saratoga-weather.org/wx4-test.php

It's that quirky rendering engine in IE that causes the ruckus.  Sorry, but no centering of the script is currently available.  I'll keep looking, but the easy fix is to NOT try and center it.

Best regards,
Ken
Title: Re: New Carterlake-style Wunderground USA Radar/Maps PHP script
Post by: Hfcomms on January 09, 2008, 08:57:58 PM
Mentioned it on the other forum but even leaving the alignment alone I'm still getting lines when I.E. renders the maps.  The lines are under the city name, the map names and the arrow icons.
Title: Re: New Carterlake-style Wunderground USA Radar/Maps PHP script
Post by: saratogaWX on January 09, 2008, 10:09:11 PM
THANKS to Jim and everyone for pitching in to test and fix the foibles/glitches.

I've updated the script to V1.04 to include the credits text within a new row at the bottom of the main table.  That's fixed the funny formatting when you just include the script via an <iframe>.  It should also fix the funny lines -)

You can download the new script (http://saratoga-weather.org/WU-radar-inc.php?sce=view) (or the distribution .zip), replace the settings section with the settings section you'd configured from the V1.03 of the script.
 
I've been playing with the <iframe> and Carterlake/AJAX template (see http://saratoga-weather.org/wx4-test-center.php ).  This is what I'd used on the page
Code: [Select]
<div align="center">

    <iframe src="http://saratoga-weather.org/WU-radar-inc.php" width="660" height="740" frameborder="0"
        style="background-color:#000000; color:#FFFFFF; font-family:Arial, Helvetica, sans-serif;"
        scrolling="no"></iframe>

</div>

Best regards,
Ken
Title: Re: New Carterlake-style Wunderground USA Radar/Maps PHP script
Post by: Moose Whisperer on April 23, 2012, 06:26:03 PM
I know many of you have tried and configured Tom's (carterlake (http://www.carterlake.org/)) USA Wunderground Radar/Maps script and have probably taken a fair amount of time and editing to adapt it to work on your website.  This new script builds on Tom's work, and also the enhancements by Jim at Juneau County Weather (http://jcweather.us/) to add additional maps. 

The script still works only for the lower-48 USA states as Wunderground hasn't yet provided the similar maps/graphics for Alaska, Hawaii, or US Territories (or non-USA locations) :(

Hi,

Is this exception still true?  :-(


thx

-Derek

Title: Re: New Carterlake-style Wunderground USA Radar/Maps PHP script
Post by: saratogaWX on April 23, 2012, 06:45:36 PM
It looks like you may be able to use it as http://www.wunderground.com/radar/radblast.asp?ID=AHG&lat=61.21574783&lon=-149.86894226&label=Anchorage%2c%20AK shows NEXRAD data so the large, Metro, City functions should work.

What might not work are the other regional maps, and the USA maps seem to have the lower 48 only :(

You might try configuring with region=ak and see what's available from WU.  I think a similar approach might work for Hawaii and Puerto Rico too.

Title: Re: New Carterlake-style Wunderground USA Radar/Maps PHP script
Post by: Moose Whisperer on April 23, 2012, 06:50:35 PM
Thanks,

Well I guess I could give it a try and see what happens!

-derek
Title: Re: New Carterlake-style Wunderground USA Radar/Maps PHP script
Post by: Moose Whisperer on May 13, 2012, 04:31:31 AM
It looks like you may be able to use it as http://www.wunderground.com/radar/radblast.asp?ID=AHG&lat=61.21574783&lon=-149.86894226&label=Anchorage%2c%20AK shows NEXRAD data so the large, Metro, City functions should work.

What might not work are the other regional maps, and the USA maps seem to have the lower 48 only :(

You might try configuring with region=ak and see what's available from WU.  I think a similar approach might work for Hawaii and Puerto Rico too.



OK, so this does work...mostly.

The region is ak (not nw, sw, etc). And the three letter code is AHG. However, since the "zoom out" function doesn't really work as there is no "wider" radar for Alaska, so it takes you to the lower 48 view. Kind of wierd:

http://www.ak-image.com/weather/dwRadar.php

Also, for the same reason there is no Alaska equivalent of the http://icons.wunderground.com/data/640x480/sw_rd_anim.gif used on the homepage of the template, so I just selected a different view (temperature) for my homepage.

http://www.ak-image.com/weather/index.php