Detect nearest location from Array of Locations by using Google Map APIs -


i've array of locations: {'place1', 'place2', 'place3'} *// these addresses

now assume there new location: 'place4'.

i want detect 1 nearest 'place4'....comparing above array of locations....

i.e. tracking nearest location of point array of locations...(by using google map apis)..

psuedo code:

foreach(var item in array) {      var = tracknearestlocationbygooglemapapis(item);      if(i nerest)      {        print(i);  , go out of loop...      } } 

there no api-call want. have calculate distance haversine formula seen here: http://www.movable-type.co.uk/scripts/latlong.html


Comments

Popular posts from this blog

c# - SharpSVN - How to get the previous revision? -

c++ - Is it possible to compile a VST on linux? -

url - Querystring manipulation of email Address in PHP -