I have a shortcut that starts by choosing a location. At the moment it can use current location, or one of a list of preset places.
I’d like to be able to use the Maps interface to choose an arbitrary location (defaulting to current location), and get the latitude and longitude from that — but I can’t figure out how. Any tips?
Use the Maps app to select the desired location (defaults to current), then use the share sheet to pass the location to a shortcut (example shortcut - Locator) that grabs the latitude and longitude for further processing.
Select and Share Location to Shortcut
Your list of preset places could simply be available as a My Places entry for quick access.
Hope that helps.
That would definitely work, thanks. But is there no way to do the selection from within Shortcuts?
I’m already used to running the existing shortcut from the home screen. Most of the time I use a preset or urgent location, and selecting in Shortcuts is much faster. It’s only occasionally that I’ll need to choose another location, and I’d prefer to be able to start the same way.
Listing the available maps actions I don’t see anything in Shortcuts that would offer an action to search on a map and return a location, and there hasn’t been one in the past.
Thanks. That’s what it looked like, but I was hoping I missed something.
It’s strange that there’s so much emphasis on using one’s current location, but so little on using other locations of you don’t already have a specific address. Also strange that the address actions only work with full addresses — just city and state won’t work, for example.
Addresses are specifically street addresses,
This is logical if you think about writing down an address, where city/town, and state/county/region constitute just part of an address.
However they are valid as locations. For example, if I specify a city to be opened in Maps…
… it will open that location.
If you’re not looking to do this too often then another approach might be…
- Launch the Maps app from the Shortcut
- Select a location
- Add this to the clipboard using the Copy action in the Share Sheet
- Return to Shortcuts using the back button at the top left of the screen
- Get the latitude and longitude from the location in the clipboard
The attached image illustrates how this might look in a Shortcut.
Note that the “Wait to return” action is needed otherwise you end up with the previous data from the clipboard.
Appreciate this is not very elegant, but it might be an acceptable workaround until something better comes along.