diff --git a/MapTest/MapScript.js b/MapTest/MapScript.js index 80c13f1..8d9bb8b 100644 --- a/MapTest/MapScript.js +++ b/MapTest/MapScript.js @@ -1,3 +1,5 @@ +window.onload = function(){initMap();}; + function initMap() { let directionsService = new google.maps.DirectionsService; let directionsDisplay = new google.maps.DirectionsRenderer; @@ -51,5 +53,3 @@ function calculateAndDisplayRoute(directionsService, directionsDisplay){ } }); } - -initMap();