Button/Link to Open Google Maps (iOS)

From the Superhuman Docs mobile app, I would like to have a button/link that redirects the user to the Google Maps iOS app. The furthest I’ve gotten is:

  1. Clicking the button/link displays this message (screenshot below). I understand this is expected behavior, so no biggie. (Buttons opening formula-generated URLs should not warn users on mobile - #7 by Nick_HE).

  1. Clicking “Open”, redirects to an in-app webpage within the Docs app.

  2. Only after clicking, “continue” will the Google Maps app open with the per-defined address.

Currently, I’ve tried variations of this formula:
"https://www.google.com/maps/search/?api=1&query=" + EncodeForURL(thisrow.Address)

Does anyone have a solution to streamline this a bit? Thanks!

I am using the pack “Google Maps Embed” and from that pack I use the formula Place(), like so:
Place("New York", zoom: 10, language: "EN")
It shows a little map with a link (open in Maps) that opens a Google Maps session without any more clicks. It is not exactly what you are asking, but it might work for you too.

@joost_mineur, thanks man. I appreciate the suggestion. It seems promising so I’ll take a whack.

You may have better luck using the native Google Maps URL scheme instead of the web link. The iOS app should open directly with something like comgooglemaps://?q= followed by the encoded address, though you’ll need a fallback for users without Google Maps installed. The extra prompt is likely coming from the Docs app’s in-app browser handling.

Thanks, Viktoriya.

I tried that during my initial troubleshooting and then again just now with a fresh mind, using this formula:

"comgooglemaps://?q=" + EncodeForUrl(thisRow.[Customer Address]).OpenWindow()

When clicking the button, I get this error message and haven’t figured out how to resolve it.

Regarding your other points.

  • Fortunately, these are company-provided iphones where google maps is set as the default.
  • I think you’re right, in that the extra prompt is coming from the in-app browser handling, as I see the same prompts when calling a phone number from my browser.

Ultimately, not the end of the world since it’s mainly just a QoL feature. Regardless, I appreciate your help.

Ah yeah, that makes sense. The comgooglemaps:// scheme should skip the in-app browser handoff entirely and open the app directly. Good call on the fallback too, I’ll check for Google Maps with canOpenURL first and drop back to the regular https://maps.google.com link if it’s not installed. That Docs in-app browser has been the culprit the whole time. Thanks, going to test this now.