var kartentyp="Platz" var startlat=54.634463509830624; var startlng=13.373393539672849; var startzoom=15; var platzname="Campingplatz Drewoldke"; document.getElementById('route_ende').value=startlat+","+startlng; var directionsDisplay; var directionsService = new google.maps.DirectionsService(); var map; function initMap() { if (kartentyp=="Platz") {initMap_Platz();} } function initMap_Platz() { directionsDisplay = new google.maps.DirectionsRenderer(); map = new google.maps.Map(document.getElementById('map'), { center: {lat: startlat, lng: startlng}, zoom: startzoom }); directionsDisplay.setMap(map); directionsDisplay.setPanel(document.getElementById('directionsPanel')); var markerpic = new google.maps.MarkerImage('//maps.gstatic.com/mapfiles/ms2/micons/campground.png', new google.maps.Size(32, 32), new google.maps.Point(0,0), new google.maps.Point(16, 16) ); var marker = new google.maps.Marker({ position: {lat: startlat, lng: startlng}, map: map, /*icon: markerpic,*/ title: platzname }); } function calcRoute() { // route berechnen document.getElementById('directionsPanel').innerHTML="Route wird berechnet..."; var start = document.getElementById('route_start').value; var end = document.getElementById('route_ende').value; var request = { origin:start, destination:end, travelMode: 'DRIVING' }; directionsService.route(request, function(response, status) { if (status == 'OK') { document.getElementById('directionsPanel').innerHTML=""; directionsDisplay.setDirections(response); } else { document.getElementById('directionsPanel').innerHTML='