Sorting by distance

Hi,
I am looking for advice on how to best create a website which does the following:

  • Users select a town from a drop down list.
  • The full list of of properties I have in my database is returned in a list/table/gallery format, but has been sorted by distance from the chosen town.

My questions are:
a) Is there a template in Wix API which could be adapted easily to meet my needs? (I’m not convinced there is).
b) If not, could you give me an overview of the steps I would need to take to create the desired functionality in Editor. Presumably I would need to include ‘distance from town A’, ‘distance from town B’, distance from town C’ etc. as an attribute of each property in my database such that the ‘distance from town x’ could be used as a sort order?
c) Any detail you can give with regarding to the code for each step would also be most gratefully received. I have no coding experience, but have found the tutorials I have looked at helpful so far.

Thank you in advance for your time and assistance

Hey
You can use Google Maps API I guess to calculate distances by using lat lon latitude and longitude calculations. So if you have lat and lon stored per property you could make a distance calculator that could sort all of them by distance.