You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

新版Google Maps URLs是否支持设置规避过路费?

Answer to Avoiding Tolls in New Google Maps URLs API

Great question! I’ve dealt with this exact confusion when transitioning from the old Maps URLs API to the new version. Here’s what you need to know:

  • The new API does support avoiding tolls—the parameter just changed from the old dirflg=dt to a standardized avoid parameter.
  • To exclude toll roads, add the query parameter &avoid=tolls to your URL.
  • Here’s your provided example URL updated with the toll-avoidance parameter:
    https://www.google.com/maps/dir/?api=1&origin=Google+Pyrmont+NSW&destination=QVB&destination_place_id=ChIJISz8NjyuEmsRFTQ9Iw7Ear8&travelmode=driving&avoid=tolls
    
  • Bonus: The avoid parameter is flexible—you can combine multiple restrictions with commas. For example, to avoid both tolls and highways, use &avoid=tolls,highways. Other valid values include ferries.

The official docs do cover this, though it’s easy to overlook if you’re searching for the old dirflg parameter. This avoid parameter is the standard way to apply route restrictions in the new Maps URLs API.

内容的提问来源于stack exchange,提问作者RichyDavisWindow3

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.28 04:08:59