Which type of storage solution are you planning to use? https://learn.microsoft.com/en-us/azure/storage/common/storage-introduction
The basic flow for your solution would be as follows:
- Get the two points you want to calculate the distance between. Is this input into the service? Stored in some file you want to process?
- If the points are addresses, geocode them using the v2 geocoding service in Azure Maps: https://learn.microsoft.com/en-us/rest/api/maps/search-v2/get-geocoding?tabs=HTTP
- Once you have coordinates, decide on the type of distance you want. If you want straight line distances, simply calculate these using the Haversine formula: https://rosettacode.org/wiki/Haversine_formula If you want distances along the roads, use the Azure Maps routing service or route matrix service (if you are processing a lot of points at once). https://learn.microsoft.com/en-us/rest/api/maps/route/get-route-directions?tabs=HTTP https://learn.microsoft.com/en-us/rest/api/maps/route/post-route-matrix?tabs=HTTP
- Take the distances, convert the units if needed as depending on which of the above you methods you use, you will likely get KM or meter distances.
- Connect to your storage account and upload your distances (how exactly you would do this depends on which storage method you are using).
Use the SDKs to make it easier to make requests to the REST services:
https://learn.microsoft.com/en-us/azure/azure-maps/rest-sdk-developer-guide
https://learn.microsoft.com/en-us/dotnet/api/overview/azure/storage?view=azure-dotnet