title: How to draw driving route from current location to destination by google map api
body: <p>I need to draw a driving line from my current location to destination including all the waypoints</p>
  
  <pre><code>@Override
  public void onDirectionSuccess(Direction direction, String rawBody) {
      Log.d("Status", "Success");
      Log.d("Direction", "" + direction);
      mMap.addMarker(new MarkerOptions().position(origin));
      mMap.addMarker(new MarkerOptions().position(destination));
      if (waypoints != null){
          for (int i = 0; i &lt; waypoints.size(); i++){
              mMap.addMarker(new MarkerOptions().position(waypoints.get(i)));
          }
      }
  
      ArrayList&lt;LatLng&gt; directionPositionList = direction.getRouteList().get(0).getLegList().get(0).getDirectionPoint();
      mMap.addPolyline(DirectionConverter.createPolyline(this, directionPositionList, 5, Color.BLUE));
  
      Log.d("Status", "Success 2");
      showRoute.setVisibility(View.GONE);
  }
  </code></pre>