Display directions from one inputed location to another inputed location on the map?

I cant copy all the html in the element because of the dynamic stuff and i cant find the original html… like i said this was a test some time ago and hasnt been implemented. Also, I need to document this better :wink:

some screenshots if that helps…

<!DOCTYPE html>
<html>
  <head>
    <meta name="viewport" content="initial-scale=1.0, user-scalable=no">
    <meta charset="utf-8">
    <title>Custom Marker Symbols</title>
    <style>
      html, body {
        height: 100%;
        margin: 0;
        padding: 0;
      }
      #map {
        height: 100%;
      }
    </style>
  </head>
  <body>
    <div id="map"></div>
    <script>
      function initMap() {
        var map = new google.maps.Map(document.getElementById('map'), {
          zoom: 4,
          center: {lat: 

<dynamic content>

, lng: 

<dynamic content>

}
        });

var pathFutureCoordinates = [
        new google.maps.LatLng(

<dynamic content>

),
        new google.maps.LatLng(

<dynamic content>

)      
      ];
      for (var i = 0; i < pathFutureCoordinates2.length; i++) {
        new google.maps.Marker({
          map: map,
          position: pathFutureCoordinates2[i],
            icon: "http://s3.amazonaws.com/appforest_uf/f1467501109227x405355788534507140/letter_f.png"
        });
      }

      var polyFutureOptions = {
        path: pathFutureCoordinates,
        strokeColor: '#1FB597',
        strokeOpacity: 0.8,
        strokeWeight: 2.5
      }; 
      var polyFutureOptions2 = {
        path: pathFutureCoordinates2,
        strokeColor: '#FFC107',
        strokeOpacity: 0.8,
        strokeWeight: 2.5
      }; 
      pathFuture = new google.maps.Polyline(polyFutureOptions);
      pathFuture2 = new google.maps.Polyline(polyFutureOptions2);
      pathFuture.setMap(map);
      pathFuture2.setMap(map);
      }
      google.maps.event.addDomListener(window, 'load', initialize);
    </script>
    <script async defer
    src="https://maps.googleapis.com/maps/api/js?key=AIzaSyCKP4DAtGCJm9rFwZr7HV_pY5e_jHOOR1s&callback=initMap">
    </script>

  </body>
</html>

I have some issues with the page so I cant test this, but im sure this worked. :slight_smile:

Thanks a lot! I am working on it now, so fingers crossed :slight_smile: - will keep you updated.

I cant seem to get it to work. I think you are missing a var for “pathfuturecoordinates1”. Hope you can help me :disappointed_relieved: