Reputation: 53
Hey i need to calculate the distance from my location to a lot of other locations (lets say 1000), the locations come in written addresses so i am getting their longitude and latitude using the geo coder, the issue is that for only 8 locations it takes lot of time to calculate, what is the fastest way to calculate this thing?
Upvotes: 1
Views: 1291
Reputation: 142
The other locations are always the same? If the answer is yes, why don't you store the locations in a database and also add the Lat and Long using the geocoder. After that, you can query by distance all the locations to your current location very fast.
Upvotes: 0
Reputation: 4855
The Google Maps Distance Matrix API may be what you're looking for.
You'd have to split up your many destinations in multiple requests, see the Usage Limits section.
Upvotes: 2