var directionDisplay; function initialize() { var icon = new google.maps.MarkerImage("/images/orange.png", new google.maps.Size(19, 32), new google.maps.Point(0,0), new google.maps.Point(10, 32)); var iconShadow = new google.maps.MarkerImage('/images/shadow50.png', new google.maps.Size(41, 34), new google.maps.Point(0,0), new google.maps.Point(16, 32)); document.getElementById("dpanel").style.display = 'none'; directionsService = new google.maps.DirectionsService(); directionsDisplay = new google.maps.DirectionsRenderer(); var myLatlng = new google.maps.LatLng(, ); var myOptions = { zoom: , center: myLatlng, mapTypeId: google.maps.MapTypeId.ROADMAP } var map = new google.maps.Map(document.getElementById("map_canvas"), myOptions); directionsDisplay.setMap(map); directionsDisplay.setPanel(document.getElementById('dpanel')); var contentString = '
'; contentString += '
'; contentString += '
'; contentString += '
Telefon '; contentString += '
email
'; var infowindow = new google.maps.InfoWindow({ content: contentString }); var marker = new google.maps.Marker({ position: myLatlng, icon: icon, shadow: iconShadow, map: map, title: '' }); google.maps.event.addListener(marker, 'click', function() { infowindow.open(map,marker); }); } function calcRoute() { document.getElementById("dpanel").innerHTML = ''; document.getElementById("dpanel").style.display = 'inline'; var start = document.getElementById("anfahrt").value; var end = new google.maps.LatLng(, ); var request = { origin:start, destination:end, travelMode: google.maps.DirectionsTravelMode.DRIVING }; directionsService.route(request, function(response, status) { if (status == google.maps.DirectionsStatus.OK) { directionsDisplay.setDirections(response); } else { document.getElementById("dpanel").innerHTML = '
 '; } }); }