问题
Google Navigation shows the traffic layer only for a given route. With GoogleMap.setTrafficEnabled(true)
I'll get the traffic information for the whole map.
I know how to draw polylines for a route from Google Directions, but how can I turn on the traffic layer only for that route?
回答1:
Not possible as of API v2 version 3.1.36. You may want to post a feature request on gmaps-api-issues.
回答2:
The difference between these two values (duration and a duration in traffic) indicates how delayed your customer is going to be on their way to or from their location.
Reference: Access Google's Traffic Data through a Web Service
Discussion: http://searchengineland.com/pull-google-maps-traffic-data-into-adwords-with-this-script-library-248934
来源:https://stackoverflow.com/questions/16843264/how-to-enable-traffic-information-along-a-specific-route-in-google-maps-v2