title: How can I reverse waypoint order in Google Maps Direction?
body: <p>I'm new here if I did something wrong, I'm so sorry.</p>
  
  <p>I have a problem in my android application. In my application, there are  some waypoints.</p>
  
  <p>I used <code>&amp;waypoints=optimize:true</code> to order my waypoints and it return waypoint order like</p>
  
  <blockquote>
    <p>waypoint_order = [0, 1, 2]</p>
  </blockquote>
  
  <p>it works but I want to reverse waypoint order like</p>
  
  <blockquote>
    <p>waypoint_order = [2, 1, 0]</p>
  </blockquote>
  
  <p><strong>Update!!</strong>
  This is my url</p>
  
  <blockquote>
    <p><a href="https://maps.googleapis.com/maps/api/directions/json?origin=16.427564,102.836095&amp;destination=16.465740,102.783359&amp;waypoints=optimize:true|16.494030551932404,102.81803341455839%7C16.491947354943868,102.83161075659177%7C16.491330107085098,102.82628925390622&amp;key=AIzaSyCCQX25nTed_-OEjUngdmKyO3mGTwFeeKQ" rel="nofollow noreferrer">https://maps.googleapis.com/maps/api/directions/json?origin=16.427564,102.836095&amp;destination=16.465740,102.783359&amp;waypoints=optimize:true|16.494030551932404,102.81803341455839%7C16.491947354943868,102.83161075659177%7C16.491330107085098,102.82628925390622&amp;key=AIzaSyCCQX25nTed_-OEjUngdmKyO3mGTwFeeKQ</a></p>
  </blockquote>
  
  <p><strong>Update again</strong>
  I want to get direction steps from that url and it return waypoint order from nearest distance of origin to farthest distance of origin but I want it return waypoint from farthest distance of origin to nearest distance of origin.</p>
  
  <p>How can I solve this problem?</p>
  
  <p>Thank you in advance.</p>