You could always use Tyler's implementation which is located
here
Before I got that fancy iMap thing on my site, that is what I used. Worked great!
I might be doing it wrong, I'm trying to embed and all I get is
....map loading, please wait...
....map loading, please wait...
all I have to do is insert the code? or is there more to it?
Thanks!
EDIT: I got the map to pop up but it has no reports on it
http://photographybydavidson.com/Team
Any ideas?
EDIT2: Bah, still need access to the FTP to auto download the files....Bah
or am I wrong? is there way I can point the map to retrieve the files like how grlevel3 does it?
Here is the code that I am using:
<script src="http://maps.google.com/maps?file=api&v=2.151&key=ABQIAAAA2r9TRzzWmtKiy1UWnrn6VxTgLhDtwz2UdZuYdOdNAPPJNXuA2BTuhECn6C2tOjKy7vYE6aRVKLpe6w" type="text/javascript"></script>
</head>
<BODY onload="onLoad()" onunload="GUnload()"> <div id="content">
<div id="logo">
<table><tr><td>
<center>Active members in past 6 hours<br>Updates Every 120 Seconds<br><A HREF="http://www.spotternetwork.org/forum/index.php?/topic/8-faq-for-terms-of-service-terms-of-use/">NON-COMMERCIAL USE ONLY</A></center>
<table border=1 align=center width=100%>
<tr>
<td valign="top">
<div id="map" style="width: 560px; height: 400px">....map loading, please wait...</div>
</td>
</tr>
<noscript>
<b>JavaScript must be enabled in order for you to use Google Maps.</b>
However, it seems JavaScript is either disabled or not supported by your browser.
To view Google Maps, enable JavaScript by changing your browser options, and then
try again.</noscript>
<script type="text/javascript">
//<![CDATA[
// nexrad data
CustomGetTileUrl=function(a,b,c) {
if (typeof(window['this.myMercZoomLevel'])=="undefined") this.myMercZoomLevel=0;
if (typeof(window['this.myStyles'])=="undefined") this.myStyles="default";
var lULP = new GPoint(a.x*256,(a.y+1)*256);
var lLRP = new GPoint((a.x+1)*256,a.y*256);
var lUL = G_NORMAL_MAP.getProjection().fromPixelToLatLng(lULP,b,c);
var lLR = G_NORMAL_MAP.getProjection().fromPixelToLatLng(lLRP,b,c);
// switch between Mercator and DD if merczoomlevel is set
if (this.myMercZoomLevel!=0 && map.getZoom() < this.myMercZoomLevel) {
var lBbox=dd2MercMetersLng(lUL.lngDegrees)+","+dd2MercMetersLat(lUL.latDegrees)+","+dd2MercMetersLng(lLR.lngDegrees)+","+dd2MercMetersLat(lLR.latDegrees);
var lSRS="EPSG:54004";
} else {
var lBbox=lUL.x+","+lUL.y+","+lLR.x+","+lLR.y;
var lSRS="EPSG:4326";
}
var ts = new Date();
var lURL=this.myBaseURL;
lURL+="&REQUEST=GetMap";
lURL+="&SERVICE=WMS";
lURL+="&reaspect=false&VERSION=1.1.1";
lURL+="&LAYERS="+this.myLayers;
lURL+="&STYLES="+this.myStyles; lURL+="&FORMAT="+this.myFormat;
lURL+="&BGCOLOR=0xFFFFFF";
lURL+="&TRANSPARENT=TRUE";
lURL+="&SRS="+lSRS;
lURL+="&BBOX="+lBbox;
lURL+="&WIDTH=256";
lURL+="&HEIGHT=256";
lURL+="&GroupName="+this.myLayers;
lURL+="&bogus="+ts.getTime();
return lURL;
}
/* This causes the map to be redrawn every 5 minutes when viewing NEXRAD
*/
function myRefreshTileLayer() {
if (map.getCurrentMapType() == custommap4) {
map.setMapType(G_NORMAL_MAP);
map.setMapType(custommap4);
}
}
var map;
// list of non-markers that must be cleared out on every update.
var polyList = new Array();
// list of markers that are re-used when new data comes in
var markerList = new Array();
// This function picks up the click and opens the corresponding info window
function mClick(id) {
marker = findMarker(id);
if (marker)
marker.openInfoWindowTabsHtml(marker.SNinfoTabs);
}
function trim_text(text) {
if (text.length > 31) {
var array = text.split(' ');
var trimed = '';
counter = 0;
for (keyVar in array) {
counter = array[keyVar].length + counter;
if (counter > 20) {
trimed = trimed + '<br>';
counter = 0;
}
trimed = trimed + ' ' + array[keyVar];
}
return trimed;
} else {
return text;
}
}
var debugObj = null;
function debugText(msg) {
return;
if (debugObj == null)
debugObj = document.getElementById("debug");
debugObj.innerHTML = msg;
}
function findMarker(id) {
var marker = null;
for (var i = 0; i < markerList.length; i++)
if (markerList
.id == id) {
marker = markerList;
i = markerList.length;
}
return marker;
}
var DO_PAN = true;
var NO_PAN = false;
function makeMarker(id, icon, lat, lng, doPan, infoTabs, title) {
var point = new GLatLng(lat,lng);
var marker = findMarker(id);
var reUsed = false;
if (marker) {
reUsed = true;
try {
marker.setImage(icon.image); // supported in google maps 2.74
}
catch (e) {
alert("failed marker.setImage, " + e.description);
}
marker.setPoint(point);
}
else {
debugText("new marker: " + id);
marker = new GMarker(point,{icon:icon,clickable:true,title:title});
// marker = new PdMarker(point,{icon:icon,clickable:true});
markerList.push(marker);
marker.id = id;
map.addOverlay(marker);
GEvent.addListener(marker, "click", function() {
if (marker.SNdoPan)
map.panTo(marker.getPoint());
if (marker.SNinfoTabs)
marker.openInfoWindowTabsHtml(marker.SNinfoTabs);
});
}
marker.lat = lat;
marker.lng = lng;
marker.SNdoPan = doPan;
marker.SNinfoTabs = infoTabs;
marker.used = true;
return marker;
}
var icon_a = new GIcon();
icon_a.image = "http://www.spotternetwork.org/icon/green_dot.png";
icon_a.iconSize = new GSize(8, 8);
icon_a.iconAnchor = new GPoint(4, 4);
icon_a.infoWindowAnchor = new GPoint(5, 1);
var icon_q = new GIcon();
icon_q.image = "http://www.spotternetwork.org/icon/yellow_dot.png";
icon_q.iconSize = new GSize(8, 8);
icon_q.iconAnchor = new GPoint(4, 4);
icon_q.infoWindowAnchor = new GPoint(5, 1);
var icon_na = new GIcon();
icon_na.image = "http://www.spotternetwork.org/icon/red_dot.png";
icon_na.iconSize = new GSize(8, 8);
icon_na.iconAnchor = new GPoint(4, 4);
icon_na.infoWindowAnchor = new GPoint(5, 1);
var icon_camera = new GIcon();
icon_camera.image = "http://www.spotternetwork.org/icon/camera.gif";
icon_camera.iconSize = new GSize(22, 22);
icon_camera.iconAnchor = new GPoint(11, 11);
icon_camera.infoWindowAnchor = new GPoint(5, 1);
var snicon_t = new GIcon();
snicon_t.image = "http://www.spotternetwork.org/icon/sn_tor.gif";
snicon_t.iconSize = new GSize(22, 22);
snicon_t.iconAnchor = new GPoint(11, 11);
snicon_t.infoWindowAnchor = new GPoint(5, 1);
var snicon_hail = new GIcon();
snicon_hail.image = "http://www.spotternetwork.org/icon/sn_hail.gif";
snicon_hail.iconSize = new GSize(22, 22);
snicon_hail.iconAnchor = new GPoint(11, 11);
snicon_hail.infoWindowAnchor = new GPoint(5, 1);
var snicon_wind = new GIcon();
snicon_wind.image = "http://www.spotternetwork.org/icon/sn_wind.gif";
snicon_wind.iconSize = new GSize(22, 22);
snicon_wind.iconAnchor = new GPoint(11, 11);
snicon_wind.infoWindowAnchor = new GPoint(5, 1);
var snicon_funnel = new GIcon();
snicon_funnel.image = "http://www.spotternetwork.org/icon/sn_funnel.gif";
snicon_funnel.iconSize = new GSize(22, 22);
snicon_funnel.iconAnchor = new GPoint(11, 11);
snicon_funnel.infoWindowAnchor = new GPoint(5, 1);
var snicon_wall = new GIcon();
snicon_wall.image = "http://www.spotternetwork.org/icon/sn_wall.gif";
snicon_wall.iconSize = new GSize(22, 22);
snicon_wall.iconAnchor = new GPoint(11, 11);
snicon_wall.infoWindowAnchor = new GPoint(5, 1);
var snicon_flood = new GIcon();
snicon_flood.image = "http://www.spotternetwork.org/icon/sn_flood.gif";
snicon_flood.iconSize = new GSize(22, 22);
snicon_flood.iconAnchor = new GPoint(11, 11);
snicon_flood.infoWindowAnchor = new GPoint(5, 1);
var snicon_flash = new GIcon();
snicon_flash.image = "http://www.spotternetwork.org/icon/sn_flash.gif";
snicon_flash.iconSize = new GSize(22, 22);
snicon_flash.iconAnchor = new GPoint(11, 11);
snicon_flash.infoWindowAnchor = new GPoint(5, 1);
var snicon_huh = new GIcon();
snicon_huh.image = "http://www.spotternetwork.org/icon/sn_huh.gif";
snicon_huh.iconSize = new GSize(22, 22);
snicon_huh.iconAnchor = new GPoint(11, 11);
snicon_huh.infoWindowAnchor = new GPoint(5, 1);
var icon_t = new GIcon();
icon_t.image = "http://www.spotternetwork.org/icon/tor.gif";
icon_t.iconSize = new GSize(22, 22);
icon_t.iconAnchor = new GPoint(11, 11);
icon_t.infoWindowAnchor = new GPoint(5, 1);
var icon_hail = new GIcon();
icon_hail.image = "http://www.spotternetwork.org/icon/hail.gif";
icon_hail.iconSize = new GSize(22, 22);
icon_hail.iconAnchor = new GPoint(11, 11);
icon_hail.infoWindowAnchor = new GPoint(5, 1);
var icon_wind = new GIcon();
icon_wind.image = "http://www.spotternetwork.org/icon/wind.gif";
icon_wind.iconSize = new GSize(22, 22);
icon_wind.iconAnchor = new GPoint(11, 11);
icon_wind.infoWindowAnchor = new GPoint(5, 1);
var icon_funnel = new GIcon();
icon_funnel.image = "http://www.spotternetwork.org/icon/funnel.gif";
icon_funnel.iconSize = new GSize(22, 22);
icon_funnel.iconAnchor = new GPoint(11, 11);
icon_funnel.infoWindowAnchor = new GPoint(5, 1);
var icon_wall = new GIcon();
icon_wall.image = "http://www.spotternetwork.org/icon/wall.gif";
icon_wall.iconSize = new GSize(22, 22);
icon_wall.iconAnchor = new GPoint(11, 11);
icon_wall.infoWindowAnchor = new GPoint(5, 1);
var icon_flood = new GIcon();
icon_flood.image = "http://www.spotternetwork.org/icon/flood.gif";
icon_flood.iconSize = new GSize(22, 22);
icon_flood.iconAnchor = new GPoint(11, 11);
icon_flood.infoWindowAnchor = new GPoint(5, 1);
var icon_flash = new GIcon();
icon_flash.image = "http://www.spotternetwork.org/icon/flash.gif";
icon_flash.iconSize = new GSize(22, 22);
icon_flash.iconAnchor = new GPoint(11, 11);
icon_flash.infoWindowAnchor = new GPoint(5, 1);
var icon_rain = new GIcon();
icon_rain.image = "http://www.spotternetwork.org/icon/rain.gif";
icon_rain.iconSize = new GSize(22, 22);
icon_rain.iconAnchor = new GPoint(11, 11);
icon_rain.infoWindowAnchor = new GPoint(5, 1);
var icon_snow = new GIcon();
icon_snow.image = "http://www.spotternetwork.org/icon/snow.gif";
icon_snow.iconSize = new GSize(22, 22);
icon_snow.iconAnchor = new GPoint(11, 11);
icon_snow.infoWindowAnchor = new GPoint(5, 1);
var icon_huh = new GIcon();
icon_huh.image = "http://www.spotternetwork.org/icon/huh.gif";
icon_huh.iconSize = new GSize(22, 22);
icon_huh.iconAnchor = new GPoint(11, 11);
icon_huh.infoWindowAnchor = new GPoint(5, 1);
var sidebar_html = "";
var rsidebar_html = "";
var lsidebar_html = "";
var sidebar_html_a = "";
var sidebar_html_b = "";
var sidebar_html_c = "";
var sidebar_html_d = "";
function buildMap(map) {
var request = GXmlHttp.create();
request.open("GET", "data.php", true);
request.onreadystatechange = function() {
debugText("request.readyState: " + request.readyState);
if (request.readyState == 4) {
var xmlDoc = request.responseXML;
// clear everything and start over
sidebar_html = "";
rsidebar_html = "";
lsidebar_html = "";
sidebar_html_a = "None";
sidebar_html_b = "None";
sidebar_html_c = "None";
sidebar_html_d = "None";
var i;
// keep track of which markers are used
for (i = 0; i < markerList.length; i++)
markerList.used = false;
// map.clearOverlays();
// we're re-using markers, but can't do the same for polylines, so clear them off
for (j = 0; j < polyList.length; j++)
map.removeOverlay(polyList[j]);
polyList = new Array();
var reports = xmlDoc.documentElement.getElementsByTagName("report");
debugText("reports loop, count: " + reports.length);
for (i = 0; i < reports.length; i++) {
createReports(reports,snicon_t,snicon_hail,snicon_wind,snicon_funnel,snicon_wall,snicon_flood,snicon_flash,snicon_huh);
}
// put the assembled sidebar_html contents into the sidebar div
document.getElementById("rsidebar").innerHTML = '<table width=100% border=1><tr><th>Event</th><th>Date</th><th>Nearest City</th><th align=left>Narrative</th><tr>' + rsidebar_html + '</table>';
var watches = xmlDoc.documentElement.getElementsByTagName("watch");
debugText("watches loop, count: " + watches.length);
for (i = 0; i < watches.length; i++) {
createWatches(watches);
}
// obtain the array of spotters and loop through it
var spotters = xmlDoc.documentElement.getElementsByTagName("spotter");
for (i = 0; i < spotters.length; i++) {
createMarker(spotters,icon_a,icon_q,icon_na,icon_camera);
}
// put the assembled sidebar_html contents into the sidebar div
sidebar_html += '<br><br><br><br><br><br><br><font color=green>Severe Studios Live Video</font><br><font size=-2>' + sidebar_html_a + '</font><br><font color=green>ChaserTV Live Video</font><br><font size=-2>' + sidebar_html_b + '</font><br><font color=green>iMap Tracker Live Video</font><br><font size=-2>' + sidebar_html_c + '</font><br><font color=green>StormChaseLive Live Video</font><br><font size=-2>' + sidebar_html_d + '</font>';
document.getElementById("sidebar").innerHTML = sidebar_html;
// any marker that no longer has data should be removed (UNTESTED)
for (i = 0; i < markerList.length; i++)
if (!markerList.used) {
map.removeOverlay(markerList);
markerList.splice(i, 1); // remove one element
i--;
}
}
}
window.setTimeout(function() { buildMap(map)},120000); // every 2 minutes
request.send(null);
}
function createWatches(new_watch) {
var watch = new_watch.getAttribute("outline");
var color = new_watch.getAttribute("color");
var watch_array = watch.split(" ");
var num = 0;
var myArray = Array();
var myPoints = Array();
while ( num < watch_array.length) {
myPoints = watch_array[num].split(",");
myArray[num] = new GPoint(myPoints[1], myPoints[0]);
num+=1;
}
var watch = new GPolyline(myArray,color,5);
map.addOverlay(watch);
polyList.push(watch);
}
function createReports(new_report,icon_t,icon_hail,icon_wind,icon_funnel,icon_wall,icon_flood,icon_flash,icon_huh){
// obtain the attributes of each report
var lat = parseFloat(new_report.getAttribute("lat"));
var lng = parseFloat(new_report.getAttribute("lon"));
var num = new_report.getAttribute("report");
var callsign = new_report.getAttribute("callsign");
var stamp = new_report.getAttribute("stamp");
var tornado = new_report.getAttribute("tornado");
var funnelcloud = new_report.getAttribute("funnelcloud");
var wallcloud = new_report.getAttribute("wallcloud");
var rotation = new_report.getAttribute("rotation");
var hail = new_report.getAttribute("hail");
var wind = new_report.getAttribute("wind");
var flood = new_report.getAttribute("flood");
var flashflood = new_report.getAttribute("flashflood");
var narrative = new_report.getAttribute("narrative");
var w_narrative = new_report.getAttribute("w_narrative");
var espotter = new_report.getAttribute("espotter");
var city1 = new_report.getAttribute("city1");
if (espotter == 1) {
espotter = 'Yes';
} else {
espotter = 'No';
}
if (tornado == 1) {
var tab_1 = 'Tornado';
var icon = icon_t;
var type = 'Tornado';
} else if (funnelcloud == 1) {
var tab_1 = 'Funnel Cloud';
var icon = icon_funnel;
var type = 'FunnelCloud';
} else if (wallcloud == 1) {
if (rotation == 1) {
var tab_1 = 'Rotating Wall Cloud';
var icon = icon_wall;
var type = 'Rotating Wall Cloud';
} else {
var tab_1 = 'Not Rotating Wall Cloud';
var icon = icon_wall;
var type = 'Not Rotating Wall Cloud';
}
} else if (hail == 1) {
var tab_1 = 'Hail';
var icon = icon_hail;
var type = 'Hail';
} else if (wind == 1) {
var tab_1 = 'Wind';
var icon = icon_wind;
var type = 'Wind';
} else if (flood == 1) {
var tab_1 = 'Flood';
var icon = icon_flood;
var type = 'Flood';
} else if (flashflood == 1) {
var tab_1 = 'Flash Flood';
var icon = icon_flash;
var type = 'FlashFlood';
} else {
var tab_1 = 'Other';
var icon = icon_huh;
var type = 'Other';
}
tab_1 = tab_1 + '<br>' + stamp + ' UTC';
tab_1 = '<div style="white-space:nowrap;">' + tab_1 + '</div>';
var tab_2 = '<div style="white-space:nowrap;">' + trim_text(w_narrative) + trim_text(narrative) + '</div>';
var infoTabs = [
new GInfoWindowTab('Info',tab_1),
new GInfoWindowTab('Details',tab_2)
];
report = makeMarker(num, icon, lat, lng, DO_PAN, infoTabs,0);
rsidebar_html += '<tr><td><font size=-3><nobr>' + type + '</nobr></font></td><td><font size=-3><nobr><a href="javascript:mClick(' + num + ')">' + stamp + ' UTC</a></nobr></font></td><td><nobr><font size=-3>' + city1 + '</font></nobr></td><td><font size=-3><nobr>' + narrative + '</nobr></font></td></tr>';
return report;
}
function createMarker(new_marker,icon_a,icon_q,icon_na,icon_camera){
// obtain the attributes of each marker
var lat = parseFloat(new_marker.getAttribute("lat"));
var lng = parseFloat(new_marker.getAttribute("lng"));
var callsign = new_marker.getAttribute("callsign");
var name = new_marker.getAttribute("name");
var num = '999'+new_marker.getAttribute("num");
var aprs = new_marker.getAttribute("aprs");
var gps = new_marker.getAttribute("gps");
var ago = new_marker.getAttribute("ago");
var net = 0;
var icon = icon_a;
if (ago > 1800) {
icon = icon_q;
}
if (ago > 5400) {
icon = icon_na;
}
var tab_1 = '<table border=1><tr><th colspan=2>' + name + '</th>';
tab_1 += '</tr>';
var ss_status = new_marker.getAttribute("ss");
var ctv_status = new_marker.getAttribute("ctv");
var wdt_status = new_marker.getAttribute("wdt");
var scl_status = new_marker.getAttribute("scl");
if ((ctv_status=="1") || (ss_status=="1") || (wdt_status=="1") || (scl_status=="1")) {
var icon = icon_camera;
if (ss_status == "1") {
if (sidebar_html_a == "None") {
sidebar_html_a = '<a href="javascript:mClick(' + num + ')">' + '- ' + name + '</a><br>';
} else {
sidebar_html_a += '<a href="javascript:mClick(' + num + ')">' + '- ' + name + '</a><br>';
}
}
if ((ctv_status == "1") || (wdt_status == "2")) {
if (sidebar_html_b == "None") {
sidebar_html_b = '<a href="javascript:mClick(' + num + ')">' + '- ' + name + '</a><br>';
} else {
sidebar_html_b += '<a href="javascript:mClick(' + num + ')">' + '- ' + name + '</a><br>';
}
}
if (wdt_status == "1") {
if (sidebar_html_c == "None") {
sidebar_html_c = '<a href="javascript:mClick(' + num + ')">' + '- ' + name + '</a><br>';
} else {
sidebar_html_c += '<a href="javascript:mClick(' + num + ')">' + '- ' + name + '</a><br>';
}
}
if (scl_status == "1") {
if (sidebar_html_d == "None") {
sidebar_html_d = '<a href="javascript:mClick(' + num + ')">' + '- ' + name + '</a><br>';
} else {
sidebar_html_d += '<a href="javascript:mClick(' + num + ')">' + '- ' + name + '</a><br>';
}
}
}
var phone = new_marker.getAttribute("phone");
var email = new_marker.getAttribute("email");
var freq = new_marker.getAttribute("freq");
var note = new_marker.getAttribute("note");
var ago = new_marker.getAttribute("ago");
if (ago<60) {
tab_1 += "<tr><th>Last Report</th><td>" + ago + " sec ago</td></tr>";
} else {
if (ago<3600) {
ago = Math.round(ago / 60);
tab_1 += "<tr><th>Last Report</th><td>" + ago + " min ago</td></tr>";
} else {ago = Math.round(ago / 3600);
tab_1 += "<tr><th>Last Report</th><td>" + ago + " hour ago</td></tr>";
}}if (callsign != 0) { tab_1 += "<tr><th>Amateur Radio</th><td>" + callsign + "</td></tr>"; };
if (ss_status == "1") { tab_1 += "<tr><th>Live Feed</th><td><a href=\"http://www.severestudios.com/livechase/\">http://www.severestudios.com/livechase/</A></td></tr>"; };
if (ctv_status == "1") { tab_1 += "<tr><th>Live Feed</th><td><a href=\"http://www.tornadovideos.net\">http://www.tornadovideos.net</A></td></tr>"; };
if (ctv_status == "2") { tab_1 += "<tr><th>Live Feed</th><td><a href=\"http://www.chasertv.com\">http://www.chasertv.com</A></td></tr>"; };
if (ctv_status == "3") { tab_1 += "<tr><th>Live Feed</th><td><a href=\"http://www.imaptracker.com\">http://www.imaptracker.com</A></td></tr>"; };
if (wdt_status == "1") { tab_1 += "<tr><th>Live Feed</th><td><a href=\"http://www.tornadovideos.net/\">http://www.tornadovideos.net/</A></td></tr>"; };
if (wdt_status == "2") { tab_1 += "<tr><th>Live Feed</th><td><a href=\"http://www.chasertv.com\">http://www.chasertv.com</A></td></tr>"; };
if (scl_status == "1") { tab_1 += "<tr><th>Live Feed</th><td><a href=\"http://www.stormchaselive.com/\">http://www.stormchaselive.com/</A></td></tr>"; };
if (phone != 0) { tab_1 += "<tr><th>Phone</th><td>" + phone + "</td></tr>"; };
if (email != 0) { tab_1 += "<tr><th>Email</th><td>" + email + "</td></tr>"; };
if (freq != 0) { tab_1 += "<tr><th>Freq</th><td>" + freq + "</td></tr>"; };
if (note != 0) { tab_1 += "<tr><th>Note</th><td>" + note + "</td></tr>"; };
tab_1 += '</table>';
tab_1 = '<div style="white-space:nowrap;">' + tab_1 + '</div>';
var infoTabs = [
new GInfoWindowTab("Status",tab_1)
];
marker = makeMarker(num, icon, lat, lng, NO_PAN, infoTabs, name);
return marker;
}
function onLoad() {
if (GBrowserIsCompatible()) {
map = new GMap2(document.getElementById("map"));
map.addControl(new GLargeMapControl());
map.addControl(new GOverviewMapControl());
map.addControl(new GMapTypeControl());
var tileNEX= new GTileLayer(new GCopyrightCollection(""),1,17);
tileNEX.myLayers='nexrad-n0r';
tileNEX.myFormat='image/png';
tileNEX.myBaseURL='http://mesonet.agron.iastate.edu/cgi-bin/wms/nexrad/n0r.cgi?';
tileNEX.getTileUrl=CustomGetTileUrl;
var layer4=[G_SATELLITE_MAP.getTileLayers()[0],G_HYBRID_MAP.getTileLayers()[1],tileNEX];
var custommap4 = new GMapType(layer4, G_SATELLITE_MAP.getProjection(), "Nexrad", G_SATELLITE_MAP);
map.addMapType(custommap4);
var taskid = setInterval("myRefreshTileLayer()", 300000 );
GEvent.addListener(map, "moveend", function() {
var center = map.getCenter();
var zoom = map.getZoom();
center = center.toString();
center = center.substring(1);
center = center.split(')');
center = center[0].split(',');
lat = center[0] * 1;
lon = center[1] * 1;
lat = lat.toFixed(4);
lon = lon.toFixed(4);
document.getElementById("centerpoint").innerHTML = 'Center Point: ' + lat.toString() + ',' + lon.toString() + ' / ' + zoom;
});
map.setCenter(new GLatLng(38, -96), 4);
buildMap(map);
} else {
alert("Sorry, the Google Maps API is not compatible with this browser");
}
}
//]]>
</script>
</div>