googlemaps / google-maps-services-js

Node.js client library for Google Maps API Web Services
Apache License 2.0
2.91k stars 640 forks source link

Request distanceMatrix is wrong #158

Closed Marjoel closed 5 years ago

Marjoel commented 6 years ago

Request from distanceMatrix is wrong:

As is:

"requestUrl": "https://maps.googleapis.com/maps/api/distancematrix/json?destinations=-23.4594133%7C-46.7037871&language=PT&mode=transit&origins=-23.4531143%7C-46.704345&units=imperial&key=XXX",
  "query": {
    "destinations": "-23.4594133|-46.7037871",
    "language": "PT",
    "mode": "transit",
    "origins": "-23.4531143|-46.704345",
    "units": "imperial",
    "key": "XXX"
  }

There is a pipe between origins/destinations, this is wrong, the right is a comma between origins/destinations.

To be:

"requestUrl": "https://maps.googleapis.com/maps/api/distancematrix/json?destinations=-23.4594133%2C-46.7037871&language=PT&mode=transit&origins=-23.4531143%2C-46.704345&units=imperial&key=XXX",
  "query": {
    "destinations": "-23.4594133,-46.7037871",
    "language": "PT",
    "mode": "transit",
    "origins": "-23.4531143,-46.704345",
    "units": "imperial",
    "key": "XXX"
  }
stephenmcd commented 6 years ago

What inputs did you use?

amuramoto commented 5 years ago

Closing due to lack of response