﻿google.load("maps", "2.x");

function initialize() {
    if (document.getElementById("map")) {
        var map = new google.maps.Map2(document.getElementById("map"));
        map.setCenter(new google.maps.LatLng(55.71, 9.537), 13);

        var geocoder = new GClientGeocoder();
        geocoder.getLatLng("Dæmningen 41 a, 7100, Vejle",
                function(point) {
                    var marker = new GMarker(point);
                    map.addOverlay(marker);

                    GEvent.addListener(marker, "click",
                        function() {
                            window.location.href = "http://maps.google.dk/maps?f=q&source=s_q&hl=da&geocode=&q=Dining+Project+vejle&sll=55.713967,9.537077&sspn=0.008594,0.027874&ie=UTF8&ll=55.713647,9.536991&spn=0.008594,0.027874&z=16&iwloc=A";
                        }
                    );
                }
            );
    }
}
google.setOnLoadCallback(initialize);