Hi all,

I am trying to find out the distances between a number of origin
points to the
closest POIs. In other words, I retrieve the coordinates of each of
the origins
and then I pass each one of them through:

      var request = {
        location: loc,
        radius: '4500',
        types: ['grocery_or_supermarket']
      };
      service = new google.maps.places.PlacesService(map);
      service.search(request, callback);

Since I cannot pass an array of locations I need to do this separately
for each
origin. I also have to wait for each callback to occur individually.
Subsequently
I pass the returned places through the
google.maps.DistanceMatrixService() that
does accept arrays of origins and destinations in order to get the
distances.

So that I don't reinvent the wheel if there is a better way to
approach this or this
is the best anyone can do in this case?

Thanks

-- 
You received this message because you are subscribed to the Google Groups 
"Google Maps JavaScript API v3" group.
To post to this group, send email to google-maps-js-api-v3@googlegroups.com.
To unsubscribe from this group, send email to 
google-maps-js-api-v3+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-maps-js-api-v3?hl=en.

Reply via email to