google maps api
I am trying to find a route between two points i enter manually at my html page but i get ZERO_RESULTS return value.

The users enters two locations  src_address = "Tel Aviv" and dst_address = "Haifa".

i get their geometric location by calling geocoder.geocode twice for each address. then set :
src_latlng = results[0].geometry.location;
dst_latlng = results[0].geometry.location;

however, when asking for router i get ZERO_RESULTS:

 here is the code:

    <script type="text/javascript">
      var directionDisplay;
      var directionsService = new google.maps.DirectionsService();
    
      var geocoder;
      var map;
      var geodesic;
      var poly;
      var src_latlng;
      var dst_latlng;
      
      function initialize() {
        directionsDisplay = new google.maps.DirectionsRenderer();
    
        geocoder = new google.maps.Geocoder();
        var latlng = new google.maps.LatLng(-34.397, 150.644);
        var myOptions = {
          zoom: 8,
          center: latlng,
          mapTypeId: google.maps.MapTypeId.ROADMAP
        }
        map = new google.maps.Map(document.getElementById("map_canvas"), myOptions);
        
    
        var polyOptions = {
          strokeColor: '#FF0000',
          strokeOpacity: 1.0,
          strokeWeight: 3
        }
        poly = new google.maps.Polyline(polyOptions);
        poly.setMap(map);
        directionsDisplay.setMap(map);
        // Add a listener for the click event
        //google.maps.event.addListener(map, 'click', addLocation);
      }
    
      function codeAddress() {
        var src_address = document.getElementById("SRC_ADDR").value;
        var dst_address = document.getElementById("DST_ADDR").value;
     
        geocoder.geocode( { 'address': src_address}, function(results, status) {
          if (status == google.maps.GeocoderStatus.OK) {
            map.setCenter(results[0].geometry.location);
            var path = poly.getPath();
            path.push(results[0].geometry.location);
            src_latlng = results[0].geometry.location;
            var marker = new google.maps.Marker({
                map: map, 
                position: results[0].geometry.location
            });
          } else {
            alert("Geocode was not successful for the following reason: " + status);
          }
        });
        geocoder.geocode( { 'address': dst_address}, function(results, status) {
          if (status == google.maps.GeocoderStatus.OK) {
            map.setCenter(results[0].geometry.location);
            map.setZoom(8);
    
            var path = poly.getPath();
            path.push(results[0].geometry.location);
            dst_latlng = results[0].geometry.location;
            var marker = new google.maps.Marker({
                map: map, 
                position: results[0].geometry.location
            });
            
            
            calcRoute();
            
          } else {
            alert("Geocode was not successful for the following reason: " + status);
          }
        });
        
        
       
      }
      
      function calcRoute() {
          
          
        
          
          var request = {
            origin:src_latlng, 
            destination:dst_latlng,
            travelMode: google.maps.DirectionsTravelMode.DRIVING
          };
    
          directionsService.route(request, function(result, status) {
           
            if (status == google.maps.DirectionsStatus.OK) {         
              directionsDisplay.setDirections(result);
            } else {
                alert(status);            
            }    
            });
        }
    
    
    </script>
google maps api
===

I am trying to find a route between two points i enter manually at my html page but i get ZERO_RESULTS return value.

The users enters two locations  src_address = "Tel Aviv" and dst_address = "Haifa".

i get their geometric location by calling geocoder.geocode twice for each address. then set :
src_latlng = results[0].geometry.location;
dst_latlng = results[0].geometry.location;

however, when asking for router i get ZERO_RESULTS:

 here is the code:

    <script type="text/javascript">
      var directionDisplay;
      var directionsService = new google.maps.DirectionsService();
    
      var geocoder;
      var map;
      var geodesic;
      var poly;
      var src_latlng;
      var dst_latlng;
      
      function initialize() {
        directionsDisplay = new google.maps.DirectionsRenderer();
    
        geocoder = new google.maps.Geocoder();
        var latlng = new google.maps.LatLng(-34.397, 150.644);
        var myOptions = {
          zoom: 8,
          center: latlng,
          mapTypeId: google.maps.MapTypeId.ROADMAP
        }
        map = new google.maps.Map(document.getElementById("map_canvas"), myOptions);
        
    
        var polyOptions = {
          strokeColor: '#FF0000',
          strokeOpacity: 1.0,
          strokeWeight: 3
        }
        poly = new google.maps.Polyline(polyOptions);
        poly.setMap(map);
        directionsDisplay.setMap(map);
        // Add a listener for the click event
        //google.maps.event.addListener(map, 'click', addLocation);
      }
    
      function codeAddress() {
        var src_address = document.getElementById("SRC_ADDR").value;
        var dst_address = document.getElementById("DST_ADDR").value;
     
        geocoder.geocode( { 'address': src_address}, function(results, status) {
          if (status == google.maps.GeocoderStatus.OK) {
            map.setCenter(results[0].geometry.location);
            var path = poly.getPath();
            path.push(results[0].geometry.location);
            src_latlng = results[0].geometry.location;
            var marker = new google.maps.Marker({
                map: map, 
                position: results[0].geometry.location
            });
          } else {
            alert("Geocode was not successful for the following reason: " + status);
          }
        });
        geocoder.geocode( { 'address': dst_address}, function(results, status) {
          if (status == google.maps.GeocoderStatus.OK) {
            map.setCenter(results[0].geometry.location);
            map.setZoom(8);
    
            var path = poly.getPath();
            path.push(results[0].geometry.location);
            dst_latlng = results[0].geometry.location;
            var marker = new google.maps.Marker({
                map: map, 
                position: results[0].geometry.location
            });
            
            
            calcRoute();
            
          } else {
            alert("Geocode was not successful for the following reason: " + status);
          }
        });
        
        
       
      }
      
      function calcRoute() {
          
          
        
          
          var request = {
            origin:src_latlng, 
            destination:dst_latlng,
            travelMode: google.maps.DirectionsTravelMode.DRIVING
          };
    
          directionsService.route(request, function(result, status) {
           
            if (status == google.maps.DirectionsStatus.OK) {         
              directionsDisplay.setDirections(result);
            } else {
                alert(status);            
            }    
            });
        }
    
    
    </script>