Open Link to Google Maps and Show Transit Tranport

I was following this thread to help set up the link and it works…one thing for anybody else who may struggle with it, there is a slight difference between the two posters link

it should begin with the below

https://www.google.com/maps/dir/?api=1&origin=

so there must be the ? mark before api to get it to work.

No need for the quotation marks around the addresses

Thanks to both posters for the help.

Other travelmodes below