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.