[Back]

  <script type="text/javascript">
    //<![CDATA[
    function GoogleMapload() 
    {    
    window.onunload=GUnload;
     
        if(window.homeSpatialInfo !== undefined && window.ProximityLocations !== undefined)
        {
          if (GBrowserIsCompatible()) {
            var map = new GMap2(document.getElementById("[MAPDIV]"));
            map.addControl(new GSmallMapControl());
            map.addControl(new GMapTypeControl());
            map.setCenter(new GLatLng(homeSpatialInfo.latitude, homeSpatialInfo.longitude), 10);

            // Create a base icon for all of our markers that specifies the
            // shadow, icon dimensions, etc.
            var baseIcon = new GIcon();
            baseIcon.shadow = "http://www.google.com/mapfiles/shadow50.png";
            baseIcon.iconSize = new GSize(20, 34);
            baseIcon.shadowSize = new GSize(37, 34);
            baseIcon.iconAnchor = new GPoint(9, 34);
            baseIcon.infoWindowAnchor = new GPoint(9, 2);
            baseIcon.infoShadowAnchor = new GPoint(18, 25);
            
            // Creates a marker whose info window displays the letter corresponding// to the given index.
            function createMarker(point, name, address, urladdress, locationNumber) {
              var icon = new GIcon(baseIcon);  
              icon.image = "[MAPLOCATION]/images/markers/marker" + locationNumber + ".png";
              var marker = new GMarker(point, icon);
              GEvent.addListener(marker, "click", function() {
                marker.openInfoWindowHtml(name + '<br>' + address + '<br>' + '<a target="_blank" href="http://maps.google.com/maps?f=q&hl=en&q=from:'+homeSpatialInfo.fromAddress+'+to:'+urladdress+'">Directions</a>');
              });
              return marker;
            }

            // Load all the markers from the JSON ProximityLocations variable
            var bounds = map.getBounds();
            var southWest = bounds.getSouthWest();
            var northEast = bounds.getNorthEast();
            var lngSpan = northEast.lng() - southWest.lng();
            var latSpan = northEast.lat() - southWest.lat();
            for (var i = 0; i < ProximityLocations.locations.length; i++) {
              var point = new GLatLng(ProximityLocations.locations[i].latitude,ProximityLocations.locations[i].longitude);
              map.addOverlay(createMarker(point, ProximityLocations.locations[i].name, ProximityLocations.locations[i].address, ProximityLocations.locations[i].urladdress, i+1));
            }
          }
        }
    }
    //]]> 
    </script>

Buy DotNetNuke Modules from Snowcovered

 DotNetNuke Powered!DotNetNuke is a registered trademark of DotNetNuke Corporation.