title: Display a route without DirectionsRenderer in Google Map V3
body: <p>I'm trying to draw my own route without a <code>DirectionsRenderer</code>.  </p>
  
  <p>Here is my code:</p>
  
  <pre><code>var map;
  var directionsService;
  
  function initialize() {
    var mapOptions = { mapTypeId: google.maps.MapTypeId.ROADMAP }
    map = new google.maps.Map(document.getElementById('map-canvas'), mapOptions);
  
    directionsService = new google.maps.DirectionsService();
  
    calcRoute();
  }
  
  function calcRoute() {
    var request = {
        origin: 'שדי חמד',
        destination: 'כפר סבא',
        travelMode: google.maps.TravelMode.WALKING
    };
  
    directionsService.route(request, function(response, status) {
      if (status == google.maps.DirectionsStatus.OK) {
        map.fitBounds(directionResult.routes[0].bounds);
        createPolyline(response);
      }
    });
  }
  
  function createPolyline(directionResult) {
    var line = new google.maps.Polyline({
        path: directionResult.routes[0].overview_path,
        strokeColor: '#FF0000',
        strokeOpacity: 0.5,
        strokeWeight: 4
    });
  
    line.setMap(map);
  
    for (var i = 0; i &lt; line.getPath().length; i++) {
        var marker = new google.maps.Marker({
            icon: { path: google.maps.SymbolPath.CIRCLE, scale: 3 },  
            position: line.getPath().getAt(i),
            map: map
        });
    }
  }
  
  google.maps.event.addDomListener(window, 'load', initialize);
  </code></pre>
  
  <p>All I get is a gray window, not even a map.<br>
  When sending the <code>DirectionsService's</code> response to the <code>DirectionsRenderer</code> I get both polylines.</p>
  
  <p>Any advice will be welcome.</p>