title: Google Maps API V3, Is this a good solution for snapping marker to road?
body: <p>so I'm developing a mobile app and have been going over the simplest ways to get markers to snap to the nearest road to where you click on the map. I've come up with the following solution, haven't seen it listed anywhere on the net and just want to see if there's anything wrong with doing it this way?</p>
  
  <p>I would post my code but it's strewn throughout a few objects. So here's the jist of it.</p>
  
  <p>So basically...
  - Establish click handler for the map that returns the lat/lng co-ords of your click (Simple)</p>
  
  <p>Then something like..
     `var DirectionsService = new google.maps.DirectionsService();</p>
  
  <pre><code>DirectionsService.route({
          'origin': clickLatLngPosition,
          'destination': clickLatLngPosition,
          'travelMode': google.maps.TravelMode.DRIVING
      }, function(response, status){
          testLat = response.routes[0].legs[0].start_location.lat();
          testLng = response.routes[0].legs[0].start_location.lng();
          testPosition = new google.maps.LatLng(testLat, testLng);
          slammedNavigator.snMapElement.gmap('addMarker', {
              'position': testPosition
          });
      });` 
  </code></pre>
  
  <p>Is this a good solution to snapping markers to the road based on a user's click? Yes or no? Is there a better way?</p>