/maps/community?hl=en
/maps/community?hl=en
6/3/15
Original Poster
Pedro G. Gaspar

New Google Maps URL scheme for common browsing

In the old Google Maps URL scheme it was possible to specify the Directions Mode (Driving, Public Transit, Walking, Bicycling) directly into the the URL, adding &dirflg=r (public transit), for example. How can I do that in new Google Maps scheme?

I've seen documentation for Android, iOS, JavaScript and WebServices (https://developers.google.com/maps/), bur I can´t find the directions for acting directly on a simple browser URL.

I just want to easy the customer life and open on browser a route from Address 1 to Address 2, but I'd like to default the direction mode to Public Transit. I just use the scheme:

https://www.google.com/maps/dir/ [Address1] [Address2]

Is it possible to do that?
Community content may not be verified or up-to-date. Learn more.
Recommended Answer
Was this answer helpful?
How can we improve it?
All Replies (6)
mr_arrow
6/3/15
mr_arrow
Hi Pedro!

I've been looking for this too and haven't found any way to do it.

Cheers
/Erik
treebles
6/3/15
treebles
These are the parameters to add at the end of the directions URL for the different modes of transportation

Car                     /data=!4m2!4m1!3e0
Bicycling            /data=!4m2!4m1!3e1
Walking             /data=!4m2!4m1!3e2
Public Transit     /data=!4m2!4m1!3e3
Airplane             /data=!4m2!4m1!3e4

For example
https://www.google.com/maps/dir/747+Howard+St,+San+Francisco,+CA/55+Music+Concourse+Dr,+San+Francisco,+CA/data=!4m2!4m1!3e3


6/3/15
Original Poster
Pedro G. Gaspar
Great treebles, it really works!

Actually, a few moments ago I was inspecting the differences between URL addresses when I changed the modes, and I noted that the only thing changed was that ending, like "!3e0", "!3e2" and "!3e3", and I've tried to add "/data=!3e3" to the end of the URL address, but it did not work. Could never imagine that a combination of some of those "mystical" informations on that "data" parameter would take it to work... Thanks a lot!
Martin Bormann
6/3/15
Martin Bormann
google new maps sucks, this is tottaly crap!

Anyway, try viamichelin.com , Yandex Maps, HERE Maps or Bing Maps! :-)

Go Hell google!
treebles
6/3/15
treebles
Hello Pedro,
Google never documented the parameters, it is just by trial and error that I found the appropriate parameters to build directions, and other features, URLs by hand.
Michael Stickles
6/23/15
Michael Stickles
The new maps uses a kind of "data block" setup. So, if you specify '/data=!4m2!4m1!3e3' to get public transit directions, what those pieces mean are:

!4m2 = Route/map/display contents block (!4m), contains 2 elements
!4m1 = Directions options (!4m), contains 1 element
!3e3 = Transportation type to use (!3e), option 3 = public transit

(those are my descriptive terms; I have no idea what Google calls them)

You could further specify that you not only want public transit but would prefer to travel by bus, which would be:

/data=!4m4!4m3!2m1!5e1!3e3

I've been beating on the new Maps URL for a few days and posted what I've figured out on my blog:

https://mstickles.wordpress.com/2015/06/12/gmaps-urls-intro/

(I'm not much for blogging, so even though I've had the blog for a couple of years those posts are the first things I've actually posted on it)
 
This question is locked and replying has been disabled. Still have questions? Ask the Help Community.

Badges

Some community members might have badges that indicate their identity or level of participation in a community.

 
Expert - Google Employee — Googler guides and community managers
 
Expert - Community Specialist — Google partners who share their expertise
 
Expert - Gold — Trusted members who are knowledgeable and active contributors
 
Expert - Platinum — Seasoned members who contribute beyond providing help through mentoring, creating content, and more
 
Expert - Alumni — Past members who are no longer active, but were previously recognized for their helpfulness
 
Expert - Silver — New members who are developing their product knowledge
Community content may not be verified or up-to-date. Learn more.

Levels

Member levels indicate a user's level of participation in a forum. The greater the participation, the higher the level. Everyone starts at level 1 and can rise to level 10. These activities can increase your level in a forum:

  • Post an answer.
  • Having your answer selected as the best answer.
  • Having your post rated as helpful.
  • Vote up a post.
  • Correctly mark a topic or post as abuse.

Having a post marked and removed as abuse will slow a user's advance in levels.

View profile in forum?

To view this member's profile, you need to leave the current Help page.

Report abuse in forum?

This comment originated in the Google Product Forum. To report abuse, you need to leave the current Help page.

Reply in forum?

This comment originated in the Google Product Forum. To reply, you need to leave the current Help page.