0
votes

https://maps.googleapis.com/maps/api/distancematrix/json?units=imperial&origins=53022,DC&destinations=35210&key=xxx

origin changes to 53170

what to do to fix it.

1
What addresses do you want for origin and destination? I'm not sure what you're trying to do, so I can't really help.ddg

1 Answers

0
votes

So, I recreated your issue and found that it does change to 53170 but I also see that it refers to an location in france.

But when I specify in both origin and destination the country:

origins=53022, USA

destinations=35210, USA

this is what i get:

"destination_addresses":[ "Birmingham, AL 35210, USA" ],

"origin_addresses":[ "Germantown, WI 53022, USA"]

even thou the numbers stays correct I see that is not in DC.

My advice is the more specific your addresses are, the better results from google you will have, your query is no very specific so google try to make sense of it to its own way and give you thouse results.

Happy Coding :)