Here’s a fun experiment to launch the Google Maps app via URL scheme directly into a new Directions view.
As I detailed this morning, the new Google Maps app for iPhone lets you launch specific views and modes using a URL scheme. You don’t need to be a developer to use the URL scheme; this means you’ll be able to launch the Google Maps app from Safari, Launch Center Pro, or any other launcher using the base
Google’s URL has a scheme for directions with addresses and transportation parameters. It lets you specific a starting address with the
saddr parameter, and a destination address with
Further, you can instruct the URL to open a specific
directionsmode, such as
With these parameters, it becomes possible to set up a nice automated workflow to launch directions using Siri or Launch Center Pro.
In Siri, you can’t launch arbitrary URL schemes, but you can trick the assistant into displaying them. Specifically, you can assign URLs to contacts and display their contact card, showing a tappable URL. AS an example. I’ve put together a Google Maps URL that takes me from my current location to Piazza Giuseppe Verdi here in Viterbo. There is no parameter for “current location”, but Google Maps is smart enough to recognize a blank
saddr value as “where I am right now”. For the destination address, Google says we can use “latitude,longitude or a query formatted address”, so for the sake of the experiment I’ll use the simplest way: copying the query version from Google Maps’ website.
On Google Maps’ website, search for a location, then copy its link using the Link button on the left. The address for Piazza Giuseppe Verdi in Viterbo will look like this. We want to use the human-readable portion of the query,
Piazza+Giuseppe+Verdi,+Viterbo,+Italy. We’ll use this to compose the final URL.
For Google Maps, I want a URL that launches the app in directions mode, with driving directions, satellite view, and standard mode (not Google Street View). By using the standard parameters documented by Google and the portion of the link copied from the Maps website, the URL will be:
At this point, we can assign this URL to a Contacts card. To do so, open Contacts on your iPhone, find a contact (or create a new one), hit Edit, and assign the URL to a URL field, such as “home page”. While you may find my Piazza Giuseppe Verdi useless, think about doing this for your Home address: you’ll get instant driving directions with Google Maps for your house every time. I called my contact “Federico Home”.
Once assigned, Siri will see it. In Siri, say something like “Show Federico Home”, and you’ll be given the contact card you’re looking for, with a Google Maps URL you can tap on to open the app with the driving directions from your current location to the preset destination already filled in. You’ll just have to choose a route, and navigation will start.
With the same concept, Launch Center Pro users can create an action to specify a destination address every single time. Simply replace the destination address with
[prompt], which will open Launch Center Pro’s keyboard prompt. From there, write your destination address normally, and Launch Center Pro will take care of properly encoding the query when passed with the URL scheme.
Until Launch Center Pro officially supports a Google Maps action, you can use this method to quickly set a destination address. The best part is that the URL scheme is really flexible, so you can set up custom actions for Street View, zoom modes, and so forth. For more information on the Google Maps URL scheme, check this page.