title: Google maps API - retrieve latlng from origin of directions?
body: <p>Im wondering on how to retrieve the latlng from the origin of a directions request when the route has been calculated. 
  I want to use this to draw a circle around the origin of the route thats been made.</p>
  
  <pre><code>function calcRoute() {
  start = document.getElementById("start").value; //value from start textbox
  end = document.getElementById("end").value; //value from end textbox
  
  var request = {
      origin: start,
      destination: end,
      travelMode: google.maps.TravelMode.DRIVING
  };
  directionsService.route(request, function(result, status) {
      //if route can be generated
      if (status == google.maps.DirectionsStatus.OK) {
          directionsDisplay.setDirections(result);
  
          //circle.setCenter();
  
      }else{
          //display window alert with status error
          window.alert('Directions request failed due to ' + status);
      }
  });
  }
  </code></pre>
  
  <p>The textboxes that are used for the origin and destination use the autocomplete method from the google dev page which is inside my initialise function that returns all types of locations.</p>
  
  <pre><code>//autocomplete section
  var inputStart = document.getElementById('start');
  var optionsStart = {}; //Empty which will return all types
  autocomplete = new google.maps.places.Autocomplete(inputStart, optionsStart);
  
  var inputEnd = document.getElementById('end');
  var optionsEnd = {}; //Empty which will return all types
  autocomplete = new google.maps.places.Autocomplete(inputEnd, optionsEnd);
  //--------------------------------------------------
  </code></pre>
  
  <p>ive researched about, would I need to just return addresses then use a geocoder to retreive the data I want or can this be done with the way my code is now.</p>
  
  <p>I have seen this piece of code around, but no idea how to implement it if this helps too.</p>
  
  <pre><code> result.routes[0].legs[0].start_location;
  </code></pre>