Launch Citymapper for Directions

The easiest way for your users to 'Get Directions'

Let's say that you have an app or website which shows locations, eg. restaurants. But for your users, finding out how to get to those places is a pain. So we worked on a special link that launches the Citymapper app, instantly showing your users the best way to get there from their current location.

 

Works for all platforms...

 

 

How to set it up 

Your code can generate a Citymapper directions link like this:

https://citymapper.com/directions?endcoord=51.537060%2C-0.079179&endname=The%20Proud%20Archivist&endaddress=2-10%20Hertford%20Road%2C%20London%2C%20N1%205ET

Let's break down the parameters:


endcoord=51.537060%2C-0.079179
The end coordinate is the only absolutely necessary part of the link; without it Citymapper doesn't know where you want to go. In this case, we're encoding the latitude 51.537060 and the longitude -0.079179. (The %2C in the middle is a URL-encoded comma.)

endname=The%20Proud%20Archivist
This is the business name or nickname of the destination. It's optional, but it will make the directions look much nicer if you can include it. In this case it's just a URL-encoded version of The Proud Archivist.

endaddress=2-10%20Hertford%20Road%2C%20London%2C%20N1%205ET
This is the street address of the destination. This is also optional, but if you provide it, it will be displayed to the user at the end of the trip to help them find the right door. In this case, it's a URL-encoded version of the street address 2-10 Hertford Road, London, N1 5ET.

Advanced Options

Start Point
If you want the directions to have a specific start point (rather than using the user's current location), you can specify it using the startcoord, startname, and startaddress parameters, which work like the endcoord, endname, and endaddress parameters, respectively.

So it should look like this:

https://citymapper.com/directions?startcoord=<lat>,<lon>&startname=<name>&startaddress=<address>&endcoord=<lat>,<lon>&endname=<name>&endaddress=<address>

Native Link Scheme
If you want to support older versions of iOS, or to force the directions to open in the native app in all cases, you can simply replace the web domain with citymapper://, for example: 

citymapper://directions?endcoord=51.537060%2C-0.079179&endname=The%20Proud%20Archivist&endaddress=2-10%20Hertford%20Road%2C%20London%2C%20N1%205ET

 

That's all there is to it.

The easiest way to give your users directions!

 

 


Want more Powers?

For deeper integrations, we also offer a plug-and-play SDK and APIs, giving you the best of Citymapper, right inside your app!

Find out more here > Powered by Citymapper