We are writing a flight search engine. We want to pre-fill the departure airport for mobile users with the closest one to their location. To do that, our plan is toFind a list of airports with their latitude/longitude.Find the user geolocation using something like HTML5 Geolocation (which asks the user for permission).Calculate the distance between the user's location and every airport to find the closest one.Fill the departure form.Is this a standard way of proceeding? I am a junior programmer and I am not used to this kind of problem. Is there any obstacle I should bear in mind while developing my solution? I have the feeling the algorithm to calculate the distance between one point and 300 locations might get a bit heavy.
Best practices for geolocation
algorithms;optimization