6

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:

  • Google maps provides the optimal route from A to B when traveling by “car”.
  • Our customers has “trucks” which cannot go on all the streets. Example: Narrow streets, or low bridge.

To find optimal truck driving route, I plan to do the following:

  • 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.
  • Now ask Google routing engine to give me routes from A to B avoiding these barriers. I am not sure how to do that.

Map only with Barriers, Map with route passing through barrier.

Pramod Vidyarthi
  • 71
  • 1
  • 1
  • 3
  • Check the answer here. http://stackoverflow.com/a/2457979/6139832, should solve your question. – Lin Shih Hao Mar 17 '17 at 06:07
  • 2
    You know what, there is long debate (started 9 years back in 2008) on having blocked road feature in google maps API. I have been following this issue at https://issuetracker.google.com/issues/35816642 but so far no updates from google. – Anand G Mar 17 '17 at 06:09
  • 2
    Possible duplicate of [Blacklisting specific roads from Google Maps/Mapquest?](http://stackoverflow.com/questions/2440967/blacklisting-specific-roads-from-google-maps-mapquest) – xomena Mar 26 '17 at 19:17
  • have you find soultion? – Rohit Mar 07 '22 at 11:30

0 Answers0