What is an isochrone?
An isochrone shows reachable areas on a map within a travel time and by a mode of transport. The TravelTime platform allows you to create isochrones. You can also integrate them into any isochrone app using an API.
The isochrone API process
To create an isochrone, the user enters the parameters of their search, including:
- departure or arrival location
- mode of transport
- travel time limit
- time of the day
This is a simple JSON request or using settings on your isochrone app. The image below is a client user interface for entering parameters.
Once the request is made, the isochrone API receives the request and returns a JSON response. The response includes coordinates for points. These points show the boundaries of shapes reachable within the travel time
Isochrone maps are a great way to visualise locations you can reach within a certain travel time. The travel time limit for our isochrones is up to 4 hours. Our TravelTime Search API can also calculate times for up to 10,000 locations by travel time in under 500 ms. Learn more.
How do I use this isochrone API?
The code example below shows how to visualise a travel time response. It shows locations within 1 hour from The White House, Washington DC by public transport. This example uses the TravelTime Search API and its isochrone algorithm.
Request an API key
To make an isochrone, you’ll first need to request a key. You can request an API key for the TravelTime Search API by clicking here and entering your details.
Isochrone request and response
API accepts JSON request and returns a JSON response.
The JSON response includes coordinates. These points show the boundaries of shapes reachable within the corresponding travel time.
This response has to be visualized on a map. Let’s explore a sample code that could do that.
Map the response in your isochrone app
Let’s break down the code for better understanding.
First, we need to define parameters for the search. We’ll need to change the name of the start location (The White House) into coordinates using a geocoder. Secondly, we need to change the departure time into the ISO format. Finally, we need to translate the 1 hour travel time into seconds which is 60 minutes x 60 seconds
Finally, we need to call a function to set up a map with a marker at the departure location
What does this mean for your isochrone app?
An isochrone API means customers can search for your products and services
Which countries does the isochrone map generator support?
Sign up for an isochrone API key now and start using The TravelTime Search API within 24 hours. To learn more about the Travel Time Search API and isochrone maps, visit our Time Map Resource page.