So.. I have 10 latitude/longitude values in a database.
Using the V3 JS API i plot these on a map.
I then have an 11th point which is 'users current location'
I want to find the distance between the user location and each of the other points.
I have created a javascript which does this - essentially, it gets the lat/long, plots the markers etc. Then with a PHP foreach loop, i loop through the lat/long pairs, and output the javascript which gets these values.
Now.. I myself do not really understand how this works.. i followed tutorials :) But it does. It uses the directionservices() function. None the less, I feel that it is safe to assume that this method must be somewhat inefficient.
Does anyone know if this is a good approach?efficient approach? what alternatives there arE?
Many Thanks