Imagine you are a store owner and would like to target customers that live within a fifteen-infinitesimal bulldoze from your shop with advertising for your weekly specials. You lot could draw a circle on a map, guessing that is nigh 15 minutes abroad, but it volition not truly represent the time it will take for customers to get to your store. For example, a customer living near a major transit road can live farther away from the shop than a customer living in a less well-served part of the city. To meet this demand, an isochrone is a polygon (an area on a map) of expected travel time. It represents the locations that volition take the specified time, or less, information technology 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 weather, is very hard to practise by yourself!

isochrone.png

Bing Maps Get Isochrones API

Using the Get Isochrones API from Bing Maps makes information technology very easy to calculate the isochrone. For our store case, we need to summate a 15-minute isochrone for every store we have. Nosotros only need the coordinates (longitude and latitude) from our stores and the drivetime in seconds (15 ten lx = 900 sec).

Become 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'south address. Then, nosotros just loop through all our customers and utilize the Detect a Location past Accost API to get the coordinates.

GET http://dev.virtualearth.net/Residue/v1/Locations/US/WA/98052/Redmond/one%20Microsoft%20Way?central={BingMapsKey}

isochrone2.png

Point In Polygon

The last stride is to cheque if a customer coordinate is inside one of our store isochrones. We use a Indicate In Polygon calculation (PiP) to determine if this is truthful. At that place are many libraries that can calculate a PiP, merely there is too an piece of cake API that can do this for you lot, the Azure Maps Point in Polygon API. We at present 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-u.s.a./maps/isochrone/isochrone-demo
•    https://docs.microsoft.com/en-united states/bingmaps/residual-services/routes/calculate-an-isochrone
•    https://docs.microsoft.com/en-us/bingmaps/remainder-services/examples/isochrone-case

To learn more most the services and solutions that brand upwardly the Bing Maps Platform, go to https://www.microsoft.com/maps.

- Bing Maps Squad