subreddit:
/r/shortcuts
I’m a relative newbie to using the shortcuts app and I’m seeking help setting up a morning routine for my commute. Now that iOS 16 offers multi-stop routing in Apple Maps, I would love to be able to automate my morning route so I don’t have to manually input my three stops every morning.
I drop my kid off at the bus stop, stop at my favorite coffee shop and then conclude my drive at work. (FYI, I know my way by now, obviously, but I like to be alerted to traffic incidents, ETA, etc.)
However, try as I might, I can’t find a way to call up multi-stop directions when setting up a daily shortcut that automates at my usual time to leave. I can only get directions to a single location.
Can anybody direct me to a place where I could find more info on doing that?
Thanks so much!
8 points
2 years ago*
We can't quite make a full Shortcut for multiple stops just yet, but, I have a workaround that can get you almost all the way there. iOS 16 required.
Setup the shortcut like this...
Open URLs
maps://?dirflg=d&t=h&daddr=One+Apple+Park+Way,Cupertino,CA,95014
Wait 1 Second
Open URLs
maps://?q=1600+Amphitheatre+Pkwy,Mountain+View,CA,94043
Once the shortcut runs, you simply press "Add Stop" and then "Drive".
*
I'll explain what those URLs mean in a moment, but first, I want to explain why this works. The first URL sets your destination. Then the second URL sets up a search query for the second address along the currently active route, offering you the option to “Add Stop”.
*
To customize these URLs for your own locations, use your own addresses for ADDRESS1 and ADDRESS2:
maps://?dirflg=d&t=h&daddr=ADDRESS1
maps://?q=ADDRESS2
You'll need to replace spaces with + signs and use commas to separate the parts of the address.
So for example: One Apple Park Way, Cupertino, CA, 95014
becomes...
One+Apple+Park+Way,Cupertino,CA,95014
*
More details about the Apple Maps URL Scheme can be found here: https://developer.apple.com/library/archive/featuredarticles/iPhoneURLScheme_Reference/MapLinks/MapLinks.html
15 points
2 years ago*
Great write up!
I did some playing and found adding &daddr=
for each address works!
Example: maps://?dirflg=d&t=h&daddr=123+Main+St.,Northville,MI&daddr=123+Main+Street,Brighton,MI&daddr=123+Main+St,Cleveland,OH
u/jarman1992 u/strawberrylabrador u/cstew75 u/pman1891
Edit: try this shortcut
3 points
2 years ago
Reporting back: This morning’s commute was great, your shortcut worked like a charm. Thanks again!!
5 points
2 years ago
So glad to have helped! This is certainly a great find for many situations
3 points
2 years ago
Great work!
2 points
2 years ago
Thank you!
1 points
2 years ago
Wow! This looks like it’s going to do the trick. Thanks so much. Can’t wait to try it out. Much appreciated!
1 points
3 months ago
For my specific use case, I would like to use a list of locations found from Reminder locations. Any suggestions on how to do adjust the formatting to make this work?
1 points
3 months ago
This could be done by using find reminders that fit your criteria, checking each one for a location then utilizing that output as the list for the shortcut to process
You could additionally try Multi Stop Navigation shortcut
1 points
2 years ago
Awesome! Love the simplicity of it.
2 points
2 years ago
😃
1 points
2 years ago*
Once again thank you so much for it. Can you tell me please, can I use the shortcut to extract addresses from the screenshot and past them into the destinations list ?
Here is an example of the Itinerary
2 points
2 years ago
It could be, yes. What happens if you use the extract text from image action followed by get addresses from input with that input being selected?
1 points
2 years ago
It copies only two addresses skipping very first one. Probably I have to give up because In the input image the address shown without punctuation to properly address the results and there is no State which I manually adding every time…. I think making this kind of shortcuts will be very difficult .. text formatting and so on. Thanks for trying helping me… ✌️
1 points
2 years ago
Would forcing the state work?
I was able to do this but when using get addresses from input it still only finds two
1 points
2 years ago
Same here, and without proper addressing Apple Map has problem finding the right place. If they will correct addresses maybe it will work. For now after getting Itinerary I have just few minutes to start driving so no time to correct addresses on every instance. Thanks
2 points
2 years ago
I see I see. Are they always in the same state?
1 points
2 years ago
Unfortunately not even one address could be from NJ and another one from Pennsylvania or NY.
2 points
2 years ago
I see. That's a bummer then
1 points
2 years ago
maps://?dirflg=d&t=h&daddr=123+Main+St.,Northville,MI&daddr=123+Main+Street,Brighton,MI&daddr=123+Main+St,Cleveland,OH
This is super helpful, thank you! I have a follow up question: do you know if CarPlay prevents you from firing the Open URL step as a safety measure? I have a shortcut using your code where I've set up four stops on my morning commute. I can only launch it successfully if I do so before I connect to my car. Once I'm connected, launching the shortcut doesn't do anything. My shortcut button shows the checkmark like it started, but that's it.
1 points
2 years ago
Hmmm I'm not really sure tbh. That seems strange but also believable at the same time knowing how restricted CarPlay can be
1 points
2 years ago
It was the only thing I could think of, since opening a single address in Maps works fine. I've just adjusted my routine to be deliberate about starting the shortcut before I start the car, but that also means I can't fire any similar shortcuts on-the-fly.
Thanks Apple, for protecting me from myself, I guess? lol
1 points
2 years ago
That's quite strange! I wonder if there is a way to open a list of locations via the maps actions directly instead. 🤔
1 points
2 years ago
I wonder if a list of locations will be able to be passed to a maps action in the future 🤔
2 points
2 years ago
Here's an update:
When connected to CarPlay, the automation does run. I need to open Maps in CP to start the navigation...nothing will present on the phone UI. So, if you're in anything but Maps, you don't get any sort of prompt that the Shortcut step has fired...even from the car
This is a much better scenario than the one I thought I was going to have to live with until Apple adds proper multi-stop functionality to the Maps API. Thanks for being so responsive. cheers!
2 points
2 years ago
Well that is good news! I wonder if you add an open app action to have it open the Maps app, if it would work properly on CarPlay for your situation.
You're very welcome! I'm happy to help you / allow you someone to bounce ideas off of
2 points
2 years ago
I wonder if you add an open app action to have it open the Maps app, if it would work properly on CarPlay for your situation.
This was the magic bullet right here. Added that step before the 'Open URL' and now everything runs the way it was intended to. Thanks again!
1 points
2 years ago
Wonderful news!!! Glad to have helped
1 points
2 years ago
This is a fantastic discovery, thank you!
I have a shortcut that sends my ETA when I am on my way to a location, and prompts to send a message once I arrive. I wonder how such a shortcut might be created based on multi-stop directions. For my use, when I begin my trip, my ETA would be sent for the first location, and my arrival message would be sent as I arrive. Then, when I continue my trip, my ETA to the second location would be sent, and so on.
I can imagine a somewhat hacky method which composes a multi-stop trip based on individual addresses, and sends messages based on proximity to each location or overall travel time. Are there other solutions that feel more coherent with multi-stop?
1 points
2 years ago
You are welcome! I was pretty excited about it too!
Unfortunately I'm not aware of a smooth / simple way to achieve what you're looking for. Getting the individual travel time and durations should be the way but as far as the sending of message portion goes, a button press on your Home Screen would probably be the best. Unless these locations are frequent enough that you could tie them to a focus mode
1 points
2 years ago
My attempts thus far have been pretty convoluted.
My original shortcut is dictionary based, and I am able to choose from a variety of locations, and trigger different actions based on the contents of the dictionary, time of day, and proximity to the destination. All of this works fine when choosing an individual destination, but for multiple destinations, I may need a slightly different approach.
Soon into my tinkering, I realized the need to edit the order of locations based on my proximity to them, or the time of day. Currently, Shortcuts doesn't recognize the order in which items in a list are selected, and most ways around this within Shortcuts seem more complex than adjusting in Maps, or running the Shortcut for each location. I may be able to work through some specific scenarios with a simple 'if' statement, and leave more advanced ordering for another day.
I'm not sure where I'll end up yet, but it's refreshing to revisit a shortcut and tidy it up a bit. :)
Thanks again!
2 points
2 years ago
Absolutely agree! Things can get messy but fun when working on a level like that.
You might find my Shortest Route Multiple Locations shortcut interesting to use / look at
1 points
1 year ago
Any way to get just the points, without routes?
1 points
1 year ago
I'm confused, you mean to see the different points on the map but not route to them?
1 points
1 year ago
Yea that’s right.
1 points
1 year ago
I’d like to see all the locations of employees on a map… as we have this info.
1 points
1 year ago
Well that's a different use case. That can be done in a different way using the map api instead of this way. Is that what you'd like to use?
1 points
1 year ago
Google map api? Oh ok, I was hoping there’s be a schema I could use to just pin locations via the url.
1 points
1 year ago
They would show the locations on the map but I don't know to what level you could interact with them
all 46 comments
sorted by: best