新版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=dtto a standardizedavoidparameter. - To exclude toll roads, add the query parameter
&avoid=tollsto 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
avoidparameter is flexible—you can combine multiple restrictions with commas. For example, to avoid both tolls and highways, use&avoid=tolls,highways. Other valid values includeferries.
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
相关产品推荐
相关产品推荐

