I'm stumped and I'm in reel need of help.

I have a custom ASP application which allows the user to search a
database of locations and it displays the results on a Google map.

I'm desperate to add some sort of NEXRAD radar feature to the results.
A layer of some kind. It doesn't have to be super fancy...just an
option which can be toggled on or off maybe...or always on.

I think if I could get a real working sample or something I could
figure the rest out. (or I hope so at least).

Any help anyone could provide would be huge!

Here is my "map.html" results page:


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://
www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="content-type" content="text/html;
charset=windows-1252">
<title>Google Map</title>
<link href="Styles/BasicSmall/Style_doctype.css" type="text/css"
rel="stylesheet">
</head>
<body>
<p>
<table style="WIDTH: 1%" cellspacing="0" cellpadding="4" border="0">
  <tr valign="top">
    <td>
      <p align="center"><img id="Image1" alt=""
src="logo_lineart_small2.gif" name="Image1"><br>
<a href="{Link1_Src}" id="Link1">Return</a></p>
    </td>
    <td>
      <p align="left">
      <!-- BEGIN Grid CCTGoogleMap -->
      <script src="http://maps.google.com/maps?
file=api&amp;v=2.89&amp;key=ABQIAAAAQc0DOQjU2zNHIiySZ1GvEBRf4-
hf82qx9J_48JJDFbpM_aeo7hT_5iQjrlld-Yv5dE1RhCZZqqPCbg" type="text/
javascript"></script>
      <script type="text/javascript">

// Map initialization code
mapUnloadBackup = window.unload;
window.unload = function () {
        if (window.unloadComplete) return;
        window.unloadComplete = true;
        GUnload();
}

mapOnloadBackup = window.onload;
window.onload = function () {
        if (!window.loadComplete) {
                window.loadComplete = true;
                try{
                        window.GUnload = GUnload;
                }catch (e){
                        alert('Unable to unload Google Map: ' +
e.message);
                }
                if (mapOnloadBackup) mapOnloadBackup();
                window.cctMaps["CCTGoogleMap"].Load();
        };
};

if (!window.cctMaps) window.cctMaps = [];
window.cctMaps["CCTGoogleMap"] = new CCTGoogleMapClass
("CCTGoogleMapHolder");
function CCTGoogleMapClass(elementId)
{
        // Definitions
        var gmap, tooltip, point, lng, lat, createMarker;
        var Markers = [], totalMarkers = 0, mapComplete = false;

        this.GetLinkMarker = GetLinkMarker;
        function GetLinkMarker(element) {
                var marker;
                var href = element.getAttribute("href");
                if (href.lastIndexOf("/") != -1) href = href.substring
(href.lastIndexOf("/") + 1);
                try { marker = Markers["id" + href]; }
                catch(e) { return null; }
                return marker;
        }

        // Display marker tooltip
        this.ShowTooltip = ShowTooltip;
        function ShowTooltip(marker) {
                if ("" == marker.tooltip || null == marker.tooltip)
return;
                // Create tooltip
                if (null == tooltip) {
                        tooltip = document.createElement("div");
                        document.getElementById(elementId).appendChild
(tooltip);
                        tooltip.style.visibility="hidden";
                }
                //Specify tooltip style
                tooltip.style.position = "absolute";
                tooltip.style.border = "1px solid #000000";
                tooltip.style.backgroundColor = "#FFFFFF";
                tooltip.style.fontFamily = "Verdana";
                tooltip.style.fontSize = "12px";
                tooltip.style.padding = "2px";
                tooltip.innerHTML = marker.tooltip;
                var point=gmap.getCurrentMapType().getProjection
().fromLatLngToPixel(gmap.getBounds().getSouthWest(),gmap.getZoom());
                var offset=gmap.getCurrentMapType().getProjection
().fromLatLngToPixel(marker.getPoint(),gmap.getZoom());
                var anchor=marker.getIcon().iconAnchor;
                var width=marker.getIcon().iconSize.width;
                var pos = new GControlPosition(G_ANCHOR_BOTTOM_LEFT,
new GSize(offset.x - point.x - anchor.x + width,- offset.y + point.y
+anchor.y));
                pos.apply(tooltip);
                tooltip.style.visibility="visible";
        }

        // Hide tooltip
        this.HideTooltip = HideTooltip;
        function HideTooltip() {
                if (null != tooltip)
tooltip.style.visibility="hidden";
        }

        // Show description window for specified marker
        this.ShowDescriptionWindow = ShowDescriptionWindow;
        function ShowDescriptionWindow(marker) {
                if ("" == marker.descriptionPage && "" ==
marker.description) return;
                var opt = marker.descriptionPage.length?{maxUrl:
marker.descriptionPage}:null;
                marker.openInfoWindowHtml("<span id='[0]bg'>[1]</
span>".replace('[0]',marker.markerId).replace
('[1]',marker.description), opt);
                if (!marker.description && marker.descriptionPage)
setTimeout("gmap.getInfoWindow().maximize()",1);
                else setTimeout("var s = document.getElementById('" +
marker.markerId + "bg').parentNode.style; s.backgroundColor='white';
s.height = '100%';s.width = '100%';",1);
        }

        // Attach event handlers to specified marker
        function AttachHandlers(marker) {
                GEvent.addListener(marker, "mouseover", function() {
                        ShowTooltip(marker);
                });
                GEvent.addListener(marker, "mouseout", function() {
                        HideTooltip();
                });
                GEvent.addListener(marker, "click", function() {
                        HideTooltip();
                ShowDescriptionWindow(marker);
                });
        }

        // Build Map
        function buildMap(finalize) {
                if (finalize) mapComplete = true;
                if (mapComplete && Markers.length == totalMarkers) {
                        // Create Map
                        gmap = this.gmap = new GMap2
(document.getElementById(elementId));
                        gmap.addControl(new GLargeMapControl());
                        gmap.addControl(new GMapTypeControl());

                        // Calculate Map Center
                        var lat = 35.5441;
                        var lng = -80.85259;
                        var zoom = 7;
                        if (Markers.length > 0) {
                                var bounds = new GLatLngBounds();
                                for (var i=0; i<Markers.length; i++) {
                                        bounds.extend(Markers
[i].getPoint());
                                }
                                zoom = gmap.getBoundsZoomLevel
(bounds);
                                lat = (bounds.getNorthEast().lat() +
bounds.getSouthWest().lat()) / 2;
                                lng = (bounds.getNorthEast().lng () +
bounds.getSouthWest().lng() ) / 2;
                        }
                        gmap.setCenter(new GLatLng(lat, lng), zoom,
G_NORMAL_MAP);

                        // Add markers
                        for (var i=0; i<Markers.length; i++) {
                                var marker = Markers[i]
                                gmap.addOverlay(marker);
                                AttachHandlers(marker);
                        }
                }
        }

        this.Load = function () {
                Markers = []; totalMarkers = 0; mapComplete = false;
                if (GBrowserIsCompatible()) {

                        var geocoder = new GClientGeocoder();
                        var geocodeStack = [];
                        var runningRequests = 0;
                        var lastRequestTime = new Date();
                        function geocodeAddress(address, callback) {
                                geocodeStack[geocodeStack.length] =
[address, callback];
                                geocodeProcess();
                        }
                        function geocodeProcess() {
                                if (runningRequests >= 0 &&
runningRequests < 3 && geocodeStack.length > 0) {
                                        if (new Date() >
lastRequestTime) {
                                                lastRequestTime = new
Date();
                                                var data = geocodeStack
[geocodeStack.length - 1];
                                                geocodeStack.length--;
                                                runningRequests++;
                                                geocoder.getLatLng(data
[0], data[1]);
                                        } else {
                                                setTimeout
(geocodeProcess, 100);
                                        }
                                }
                        }
                        // Add markers
                        //-----------------------------
                        <!-- BEGIN Row -->
                        createMarker = function (point) {
                                runningRequests--; geocodeProcess();
                                if (!point) { totalMarkers--; buildMap
(); return; }
                                var icon = null;
                                var iconUrl = "{MarkerIconUrl}";
                                if (iconUrl) icon = new GIcon
(G_DEFAULT_ICON, iconUrl);
                                var marker = new GMarker(point, icon);
                                marker.markerId = "{MarkerId}";
                                marker.tooltip = "{MarkerTitle}";
                                marker.description =
"{MarkerDescription}";
                                marker.descriptionPage = ("index.asp?
marker_id=[id]").replace(/\[id\]/ig, marker.markerId);
                                Markers[Markers.length] = Markers["id"
+ marker.markerId] = marker;
                                buildMap();
                        }
                        lat = "{MarkerLatitude}";
                        lng = "{MarkerLongitude}";
                        totalMarkers++;
                        if (lat.length>0 && lng.length>0) {
                                point = new GLatLng(lat, lng);
                                createMarker(point);
                        } else {
                                var address = "{MarkerAddress}";
                                if (address.length > 0) {
                                        geocodeAddress(address,
createMarker);
                                } else totalMarkers--;
                        }
                        <!-- END Row -->
                        //-----------------------------
                        buildMap(true);

                }
        }
}
</script>
      <table cellspacing="0" cellpadding="0" border="0">
        <tr>
          <td valign="top">
            <table class="Header" cellspacing="0" cellpadding="0"
border="0">
              <tr>
                <td class="HeaderLeft"><img src="Styles/BasicSmall/
Images/Spacer.gif" border="0"></td>
                <th>Map</th>

                <td class="HeaderRight"><img src="Styles/BasicSmall/
Images/Spacer.gif" border="0"></td>
              </tr>
            </table>

            <table class="Record" cellspacing="0" cellpadding="0">
              <tr class="Controls">
                <td>
                  <div id="CCTGoogleMapHolder" style="WIDTH: 1200px;
HEIGHT: 1100px">
                    <font face="Tahoma" size="2">Loading...</font>
                  </div>
                </td>
              </tr>
            </table>
          </td>
        </tr>
      </table>
      <!-- END Grid CCTGoogleMap --></p>
    </td>
  </tr>
</table>
&nbsp;{FOOTER}</p>
</body>
</html>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Maps API" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/Google-Maps-API?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to