How to calculate travel door to door with and without an API

by Niharika Sisodia
on Oct 31, 2018 9:23:02 AM

What is a routing map?

A routing map shows you the route from a starting point to a destination. A simple example would be calculating a route from your home address to your local supermarket. The map below uses the TravelTime platform to show the route from Kennington to the UK supermarket, Tesco.

TRY APP NOW

travel-door-to-door

The TravelTime platform returns routing information between a starting point and the destinations. You can do a departure or arrival search from the search origin to up to two destination points. For example, arrive at London King’s Cross station at 9am or depart at 9am.

travel-time-search

The example below shows the shortest route from King’s Cross to the British Museum departing at 9am.

travel-door-to-door

The user could also do an arrival search.

travel-time-search

The example below shows the shortest route from King’s Cross to the British Museum arriving at 9am.

travel-door-to-door

The TravelTime platform supports the following modes of transport:

  • Cycling
  • Driving
  • Driving+train
  • Public transport
  • Walking
  • Coach
  • Bus
  • Train
  • Ferry
  • Driving+ferry
  • Cycling+ferry

Using routing on TravelTime Maps tool

Try it yourself. Travel door to door using the TravelTime platform.

Routing can also be integrated into websites as part of a business solution. For example, a cinema chain could use routing on a cinema finder page. The below map uses Time Map and Time Filter, powered by the TravelTime Search API.

In this example, the user can find out which cinemas are easiest to reach. They enter their preferred mode of transport (public transport in the example below) and the journey times to each location is shown. Time Map produces the isochrone shape on the map. Time Filter produces the journey time information in a list on the left side of the page. The below example shows all cinemas within 15 minutes of central London by public transport.

travel-door-to-door

From the map or the list, the user would select their preferred cinema. They would then select ‘directions to here’.

travel-time-search

 

 

 

 

 

 

 

This would provide them with a route.

travel-door-to-door

Time Filter can return travel time and directions for up to 100,000 points from the search origin. Time Filter requires a defined travel time limit of up to 4 hours. This allows it to show only the results that are relevant to the user and to filter out unreachable locations.

Learn more about Time Filter and how the TravelTime Search API can support your business.

How do I code a route?

Before you begin, you first need to request an API key and ID.

The example below shows you how to code a departure search. The point of origin is the centre of London. The destination points are Hyde Park and ZSL London Zoo. The mode of transport is driving. In the example, the departure date is 2018-09-17 and the departure time is 08:00. The request is for travel time, distance and route.

Request

First, you need to create the request.

Add locations

Then, you need to add locations to your request by entering the geo-coordinates. In this case, we will use 51.508930, -0.131387 as the centre of London, 51.508824, -0.167093 as Hyde Park and 51.536067, -0.153596 as ZSL London Zoo. Take a look at our free geocoder tool if you don’t have lat/longs.

This request has both a departure and arrival search example.

For the departure search, the API returns travel times, route details and fares for public transport. It also shows the distance for other modes from one departure point to up to two destination points.

Departure search

travel-door-to-door

travel-door-to-door

For the arrival search, the API returns 1 result for this journey within a range of 1800 seconds (30 minutes). This means the user can arrive within a 30-minute window, rather than arrive at a specific time. The API can also return up to 5 alternative results, like on the screenshot below.

Arrival search

travel-time-search

travel-time-search

travel-time-search

travel-time-search

Response

The response for this request contains the departure and arrival search results with routes information. Look at the code here.

GET AN API KEY

Get in touch to learn more about calculating travel door to door using the TravelTime platform.

 

Related

TravelTime platform releases isochrone QGIS plugin

Create a QGIS isochrone using the TravelTime platform API. API keys are free to use for non-commercial purposes. You can also calculate a distance matrix and routing using the plugin.

Louisa Bainbridge Jun 26, 2019 12:15:16 PM
READ

IFS use TravelTime to calculate 3.2 billion journey times

How the IFS created a travel time matrix of 40,000 origins to 40,000 destinations for both driving and public transport using the TravelTime platform.

Louisa Bainbridge Apr 16, 2019 11:02:04 AM
READ

The top 10 office relocation blogs

Our 10 favourite blogs to help with office relocation. Moving office guides to analyse potential areas for your office and plot staff addresses and manage time effectively when relocating.

Niharika Sisodia Jan 14, 2019 1:12:12 PM
READ

How to personalise your geolocator to improve user experience

Design your geolocator to improve user experience. Consider user journey when requesting geolocation from visitors to your site. Use geolocation to help users discover your services.

Niharika Sisodia Jan 4, 2019 10:01:00 AM
READ

5 ways to increase conversion rates using a map

Discover how using a map can increase conversion rates for your product or service. Increase the relevance of results for your users. Encourage users to take the desired action by filtering out irrelevant results.

Niharika Sisodia Jan 2, 2019 9:13:18 AM
READ

Create your own driving commute distance map in the USA & beyond

Create a commute distance map and drive time map. View potential areas to work on a commute distance map. Search by travel time instead of distance.

Niharika Sisodia Nov 14, 2018 1:45:13 PM
READ