Search code examples
asp.net-corelocationdistance

asp.net core, Any library to get distance and time travel between two locations


Is there any library that get distance and time travel between two locations with options like: Legs, Vehicle, Bikes ...

I don't want to use google maps because I have to call an api on their server.

any help please


Solution

  • I think I found this library, It's easy to use

    https://docs.mapbox.com/api/navigation/map-matching/

    you can create an account and get a key then call an API url to get distance, duration, Like this:

    https://api.mapbox.com/matching/v5/mapbox/driving/-117.17282,32.71204;-117.17288,32.71225;-117.17293,32.71244;-117.17292,32.71256?approaches=curb;curb;curb;curb&access_token=pk.eyJ1Ijoibm92ZXJzbWFwIiwiYSI6ImNreTdwc3ppNTE3dzkyb3B2MnVzNXpueTUifQ.csYTL2GKkl99Yqk_TQjr5w