How to Create a Route on Google Maps from User Location

Hi everyone,

  1. I have a Google Map on a page that shows the event location, and I want it to create a route from the user’s current location to the event location. How can I do that?
  2. I want to add an input where the user can select a different starting location for the route to the event. How can I do that?

You can use urls like these
https://www.google.com/maps/dir/?api=1&origin=START_LOCATION&destination=END_LOCATION&travelmode=driving

And place location dynamically with open external website in workflow or links
Make sure to replace spaces with %2b using find and replace
You can change mode to cycling etc

Thank you!
I’ll try it when i get back home

1 Like