﻿    var map;
    var gdir;
    var geocoder = null;
    var addressMarker;
    var address = "3887 West Frontage Road Port Orchard, WA 98367";

    function initialize() {
      if (GBrowserIsCompatible()) {      
        map = new GMap2(document.getElementById("map_canvas2"), { size: new GSize(577,320) } );
        map.addControl(new GSmallMapControl());
        map.setCenter(new GLatLng(47.525325, -122.703475), 13);
        
        gdir = new GDirections(map, document.getElementById("directions"));
        GEvent.addListener(gdir, "load", onGDirectionsLoad);
        
        //Shows a point
        var point = new GLatLng(47.525325, -122.703475);
                        
        //Show marker and add text to it
        var point = map.addOverlay(new GMarker(point));
      }
    }
    
    function setDirections(fromAddress) {
      gdir.load("from: " + fromAddress + " to: 3887 West Frontage Rd Port Orchard, WA 98366");
    }

    function onGDirectionsLoad(){
    }
    
    window.unload = GUnload();