Use Bing Maps to calculate an isochrone to reach your customers
Imagine you are a store owner and would like to target customers that live within a 15-minute drive from your store with advertising for your weekly specials. You could draw a circle on a map, guessing that is about 15 minutes away, but it will not truly represent the time it will take for customers to get to your store. For example, a customer living near a major transit route can live further away from the store than a customer living in a less well-served part of the city. To meet this need, an isochrone is a polygon (an area on a map) of expected travel time. It represents the locations that will take the specified time, or less, it will take to get to a specific point (your store, in this case). Estimating an isochrone correctly, including all the variables like traffic, road, and vehicle conditions, is very hard to do by yourself!
![isochrone.png isochrone.png](https://blogs.bing.com/getattachment/maps/2021-11/Use-Bing-Maps-to-calculate-an-isochrone-to-reach-your-customers/isochrone.png.aspx)
Bing Maps Get Isochrones API
Using the Get Isochrones API from Bing Maps makes it very easy to calculate the isochrone. For our store example, we need to calculate a 15-minute isochrone for every store we have. We only need the coordinates (longitude and latitude) from our stores and the drivetime in seconds (15 x 60 = 900 sec).
GET https://dev.virtualearth.net/REST/v1/Routes/Isochrones?waypoint=47.65431,-122.1291891&maxTime=900&key={BingMapsKey}
To determine which customer is living inside the 15-minute drive isochrone, we first need the coordinates for every customer's address. Then, we simply loop through all our customers and use the Find a Location by Address API to get the coordinates.
GET http://dev.virtualearth.net/REST/v1/Locations/US/WA/98052/Redmond/1%20Microsoft%20Way?key={BingMapsKey}
![isochrone2.png isochrone2.png](https://blogs.bing.com/getattachment/maps/2021-11/Use-Bing-Maps-to-calculate-an-isochrone-to-reach-your-customers/isochrone2.png.aspx)
Point In Polygon
The last step is to check if a customer coordinate is inside one of our store isochrones. We use a Point In Polygon calculation (PiP) to determine if this is true. There are many libraries that can calculate a PiP, but there is also an easy API that can do this for you, the Azure Maps Point in Polygon API. We now can target those customers close by a store with store-specific offers and promotions.
Links
• https://www.microsoft.com/en-us/maps/isochrone
• https://www.microsoft.com/en-us/maps/isochrone/isochrone-demo
• https://docs.microsoft.com/en-us/bingmaps/rest-services/routes/calculate-an-isochrone
• https://docs.microsoft.com/en-us/bingmaps/rest-services/examples/isochrone-example
To learn more about the services and solutions that make up the Bing Maps Platform, go to https://www.microsoft.com/maps.
– Bing Maps Team
Source: Bing Blog Feed