Using the following routine would it be possible to find the ten nearest clincs I am using parse.com to store my info and I have long and latitude their I am using xamian.ios c#. I want to be able to just list the first ten ares that match one being passed in with just using long and lat ?
I am very basic at maths so if any formulas need using can an example be provided thanks.
public async void populateFromParseLocalDB()
{
var query = ParseObject.GetQuery ("clinics");
IEnumerable<ParseObject> results = await query.FindAsync();
int i=0;
foreach (var record in results)
{
i++;
Console.WriteLine("in for each");
var name = record.Get<String>("Name");
var lat = record.Get<string>("lat");
var lng = record.Get<string>("lng");
Console.WriteLine(name);
}
int mycount = i;
}