title: Driving directions for “truck” in google maps
body: <p>I work for a company which helps trucking companies in optimizing their routes. I am using Google Maps API, v3 to determine optimal route between two points. Here is the business case I need help with:</p>
  
  <ul>
  <li>Google maps provides the optimal route from A to B when traveling by “car”.</li>
  <li>Our customers has “trucks” which cannot go on all the streets. Example:      Narrow streets, or low bridge.</li>
  </ul>
  
  <p>To find optimal truck driving route, I plan to do the following: </p>
  
  <ul>
  <li>Mark the constrained spaces (narrow streets, low bridge, etc) as a barrier in google map. I was able to do so using DirectionService and DirectionRenderer APIs.</li>
  <li>Now ask Google routing engine to give me routes from A to B avoiding these barriers. I am not sure how to do that.</li>
  </ul>
  
  <p><a href="https://i.stack.imgur.com/g50e8.png" rel="noreferrer">Map only with Barriers</a>,
  <a href="https://i.stack.imgur.com/58Lzg.png" rel="noreferrer">Map with route passing through barrier</a>.</p>