Embedding a map in a photo using shortcuts

Hi, this is the continuation of a scriptable question about embedding a map.

I have done this with shortcuts using openstreetmap.
This looks like:

I split it into two scripts, one calling the other:
Outer one:
https://www.icloud.com/shortcuts/74677f616d6f46bc9b98aa9e1b33d33e

This transforms the geo- coordinates into tile- numbers for OSM

Inner one:
https://www.icloud.com/shortcuts/ee3a1ef3816748cc94126c1f7f569cc3

This loads the 4 tiles and pins the location

Have fun!

So I renamed the ā€˜inner oneā€™ to be called GetOSMap22 to match the callout in the ā€˜outer oneā€™ but now instead of failing by saying that it doesnā€™t recognize the callout it just seems to fail without showing any result, nor saving a new photo.

(Note: I do get to select a photo, and to set a zoom level, but then it thinks for a while, then I see the green background progressing across the overlay masked image onto foto step and it crashes).

Any ideas?

Same experience here

Hi all,

First of all - sorry, I was not aware of that the names of the shortcuts are not preserved- renaming the ā€žinner oneā€œ was indeed right.

The getOsmap22 should be able to run standalone- did you tried that? Maybe it fails due to the access of the Web Site- which will be asked for if running the first time.

We will get the thing going;)

Hi! I created an all-in-one shortcut that does the same thing but with Apple Maps images: https://www.icloud.com/shortcuts/29026a96df22462e921970c91567d3b6

First, we select a photo and get the address out of it using Apple Maps. Then I switch into light mode (my phone is always in dark mode) because the ā€œMask Addresses with Ellipseā€ step generates an image from the address and that uses the current light/dark mode setting. Once I got the masked image, I revert to dark mode. Then I overlay the masked image on the initially selected photo, show it in quick look and allow it to be shared.

Of course, the image generated gives you not a lot of options, but GizmoPack has a ā€œSnapshot Mapā€ function that is relatively flexible (but does not add a pin to the location ā€“ which you could do yourself with a bit of image overlaying).

I love how you can get similar results with different approaches in Shortcuts and the flexibility you get to make something your own.

Edit: Forgot to add my example image:

1 Like

Hi Yatil,

Seems a lot more straight forward than my solution;)

Iā€˜d never have tried to handle map-adresses as a map pictureā€¦

1 Like

Thatā€™s the nice thing with Appleā€™s actions in particular. If you use the ā€œView Content Graphā€ action, you get all the different formats that you can use. In this case that includes ā€œImageā€ :slight_smile:

Now I have a clue what that content graph is forā€¦:joy:

Thank you!