Latitue and Longitude on Google Maps

Usually, there is a need to get the directions based on given latitudes and longitude. After a good healthy search found something interesting which I wished to share.
You can view the example on JS Fiddle: http://jsfiddle.net/SurajMindfire/7utktkp4/.
  1. <!DOCTYPE html>    
  2. <html>    
  3.     <head>    
  4.         <script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=true"></script>    
  5.     </head>    
  6.     <body>    
  7.         <div id="map"></div>    
  8.     </body>    
  9. </html>    
  10.   
  11. $(document).ready(function() {    
  12.  var myOptions = {    
  13.      mapTypeId: google.maps.MapTypeId.ROADMAP,    
  14.      mapTypeControl: false,    
  15.  panControl: false,    
  16.      zoomControl: true,    
  17.      zoomControlOptions: {    
  18.          style: google.maps.ZoomControlStyle.LARGE,    
  19.          position: google.maps.ControlPosition.LEFT_CENTER    
  20.      },    
  21.  scaleControl: false,    
  22.      streetViewControl: false,    
  23.  };    
  24.  var map = new google.maps.Map($("#map")[0], myOptions),    
  25.  directionsService = new google.maps.DirectionsService(),    
  26.  directionsDisplay = new google.maps.DirectionsRenderer({map:map});    
  27.  new google.maps.Marker({    
  28.      position: new google.maps.LatLng(26.968468, 23.766233),    
  29.   map: map    
  30.  });    
  31.  var request = {    
  32.      origin: new google.maps.LatLng(40.962200, 23.615602),    
  33.      destination: new google.maps.LatLng(37.968468, 23.766233),    
  34.      travelMode: google.maps.TravelMode.DRIVING    
  35.  };    
  36.  directionsService.route(request,    
  37.  function(response, status) {    
  38.      if (status == google.maps.DirectionsStatus.OK) {    
  39.          directionsDisplay.setDirections(response);    
  40.      }    
  41.  });    
  42. });    
  43.  
  44. #map{    
  45.  width:500px;    
  46.  height:500px;    
  47. }   
Hope this helps.