Weather4Webs.com Logo
 Free Weather and Weather Source Code For Web Sites

Home Current Forecasts Radar Images Other Aviation Source Blog About
 

Source Code for Radar on a Google® Map

 
 

Tips & Tricks

  1. You will need your own Google Account and Map API Key. It is free, see http://code.google.com/apis/maps/.
  2. The trick to the overlay was the bounds. The NWS provides the top left lat and long if you change the file extension to ".gfw". In stead of http://radar.weather.gov/ridge/Conus/RadarImg/latest_radaronly.gif see http://radar.weather.gov/ridge/Conus/RadarImg/latest_radaronly.gfw.
  3. The next thing I figured out was that the top left lattitude and longitude was useless because Google wants the bottom left and top right coordinates of the image. After spenging a lot of time trying to calculate them I discovered the NWS's KMZ files at http://www.srh.noaa.gov/ridge/kmzgenerator.php. The kmz files are zipped kml files, which are xml files. Once I download the kmz file, I was able to change the kmz file extension to .zip. Windows® then unzipped it and let me at the kml file. The kml files contain the lattitudes and longitudes for the north, south, east, and west points of all the radar images.
  4. The next thing I wondered was how the overlay layered. Google Polylines do appear above the radar images.