Distance Calculator

I am a shortcuts newbie.

I am looking to calculate distances between places multiple times. I can’t however figure out how to do it with putting in the starting location only once.

So:
A -> Reno
A -> San Francisco
A -> Los Angeles
A -> Lake Tahoe

Then export it all to one text window.

How do I use the starting variable more than once? I got it to run with one location but that’s it.

Bonus Points if it screen shots the map. Which I haven’t gotten it to do.

Try this.

The key part you might have missed on yours is either setting your initial location as a variable, which you can then re-use, or alternatively, simply referencing it as a magic variable - i.e. it’s implicit definition.

The example above uses some looping, so as it is, I just need to reference it once in any case.

In terms of screen shotting “the map”, what map would you expect? Distance measurement is not necessarily derived from a map (often it’s can be data store of nodal mappings), and even if it were, you have four independent operations, so that would be four separate maps.

If you want to grab an image of a route map, you would need to use some sort of online mapping or a third party map app that supprts the appropriate x-callback-url options to allow you to receive a map image back.

Hope that helps.

Save the starting position in a variable and all destinations in a list. Repeat over that list and pass the wanted results to the End Repeat action. You then get a list out of the repeat block which you can combine with the Combine Text action.

I think, you can get a screenshot if you use Get Images from Input on a location.

I will try that for a MK 2 version. I got a janky version together with setting the start location as a variable, then pulling each location as a separate instance. It’s not very elegant.

That looks awesome, thank you. I did the below before I saw yours. Mine is much less elegant.

Thank you, yours is much more flexible.

Distances

Try this shortcut:

https://www.icloud.com/shortcuts/7669d3e39baa40d0b5e8d9d3dbae4ae1

another good one, thank you.