In my ASP.NET MVC 5 application I have a ApiController (WebApi) with a method that returns a list of establishments (stored in my database) ordered by Name. It works fine.
Now I want to be able to sort this list by distance. So, the mobile application that consumes the web service would send the user location as parameter and at server side I need to calculate the distance between the user location and the location of each establishment.
What tools can I use to do this? Google Maps API? Another one? I've searched but didn't find anything useful... If anyone knows where to find an example on how to start with this it would be very helpful.
Update
Here are some more details:
- My database is in SQL Server 2014;
- Each establishment already has latitude and longitude stored in my database;
I would prefer to get the distance of the shortest path by car...