distance-matrix-api icon indicating copy to clipboard operation
distance-matrix-api copied to clipboard

Unable to get distances for multiple origins to single destination

Open rvignesh89 opened this issue 8 years ago • 1 comments

This is because travel_list expects a strict dictionary with both origin and destination keys present. Otherwise to_param() raises and error when it converts the dict to string.

I could add the same destination address for different origins to work around but considering that Google usage limits are calculated by element returned this doesn't seem like a viable option for me.

My suggestion would be get the coords in a matrix like how the actual api expects and then convert that into a the url. This would be really useful! I'll send a PR for this soon.

rvignesh89 avatar Mar 10 '17 07:03 rvignesh89

Hey !

Sorry for such a late answer. It is indeed a great idea and i'm also gonna rework some part of the library soon. I'll be more than happy to read your PR though.

C404 avatar May 05 '17 10:05 C404