
Mapping Time: Exploring Service Boundaries with Amazon Location Services Isolines
Explore how to draw Isolines on a Map
Steven Cook
Amazon Employee
Published Jan 14, 2025
In today's fast-paced world, time is often more valuable than distance. Whether you're a business owner planning delivery routes, a real estate agent helping clients find homes within a certain commute time, or an event planner determining venue accessibility, understanding how far you can travel within a specific timeframe is crucial. This is where the power of isolines comes into play.
Amazon Location Services has introduced an exciting feature that allows developers to generate isolines on maps, visually representing areas that can be reached within a given travel time or distance. In this blog post, we'll explore how to leverage this powerful tool to create time-based service boundaries, opening up a world of possibilities for location-based applications and decision-making processes.
By the end of this post, you'll understand how to implement this feature by creating a Map, calling the Isoline API and rendering the boundary on the map.
The example web application that we will create allows the calculation of how far you can travel in a number of minutes by foot or car.

The first step is to go to the Amazon Location Services console page and create an API Key. As we are only rendering a map and calculating IsoLines, select "GetTile" and "GetStaticMap" for Map Actions and "CalculateIsolines" for Route Actions. Set Referers to be the origin that is serving your web page, to ensure the API Key can only be used by your application.

To render the map on the web page, we can use the example code provided in the Amazon Location Services documentation.
This is enough to render the map on the web application.
When a user clicks on the map, we extract the longitude and latitude from the event passed to the handler function, set the location of the marker and add it to the map.
Handling updates to the travel time or mode is done via a handler configured on the Update button in the side bar. It simply get the values from the form and calls
renderIsoline()
to recompute the new Isoline and redraw it on the map. To calculate the Isoline the request body is constructed to specify the starting Origin, the Departure Time, how long to travel for in seconds, the mode of transport and format for the geometry of the Isoline polygon. The documentation outlines many other options that can be used to influence the Isoline calculation.
The CalculateIsolines API URL is called, the response is JSON structure, from which array of longitude and latitude points are extracted. A GeoJSON polygon feature object is constructed to be used by the mablibre library to render on the map by the
updateMap()
function. The code to finally render the Isoline on the map is straight maplibre API calls to add a GeoJSON data source to the map then render the outline and fill of the polygon.
Amazon Location Services' Isoline feature offers a powerful tool for visualizing time-based service boundaries on maps. By following the steps outlined in this post, developers can easily integrate this functionality into their web applications, enabling users to explore travel times and accessibility from any given point. Whether you're optimizing delivery routes, analyzing real estate options, or planning event locations, isolines provide valuable insights that can drive better decision-making. As location-based services continue to evolve, tools like this will become increasingly important for businesses and organizations looking to leverage spatial data effectively. We encourage you to experiment with this feature and discover how it can enhance your own location-aware applications.
Any opinions in this post are those of the individual author and may not reflect the opinions of AWS.