How to enable traffic information along a specific route in Google Maps V2?

旧街凉风 提交于 2019-12-13 13:10:11

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!