googlemaps / openapi-specification

OpenAPI specification for Google Maps Platform API
Apache License 2.0
102 stars 86 forks source link

DistanceMatrixApi is sending comma's between multiple points instead of pipes... #270

Closed chrisgrimaldi70 closed 2 years ago

chrisgrimaldi70 commented 2 years ago

Thanks for stopping by to let us know something could be better!


PLEASE READ

If you have a support contract with Google, please create an issue in the support console. This will ensure a timely response.

Discover additional support services for the Google Maps Platform, including developer communities, technical guidance, and expert support at the Google Maps Platform support resources page.

If your bug or feature request is not related to this particular library, please visit the Google Maps Platform issue trackers.

Check for answers on StackOverflow with the google-maps tag.


Please be sure to include as much information as possible:

Environment details

  1. DistanceMatrixApi
  2. Window 10 Pro
  3. v1.17.6 of the specification

Steps to reproduce

  1. Calling method public async System.Threading.Tasks.Task DistanceMatrixAsync (List destinations, List origins, decimal? arrivalTime = null, decimal? departureTime = null, string avoid = null, string units = null, string language = null, string mode = null, string region = null, string trafficModel = null, string transitMode = null, string transitRoutingPreference = null)
  2. Passing in the 2 destinations of coordinates
  3. the Url constructed has comma between the destination coordinates instead of "|" pipe delimited. Fails call to google api

Code example

        List<string> destinationList = request.DestinationPoints.Select(s => s.ToString()).ToList();
        List<string> originList = request.StartPoints.Select(s => s.ToString()).ToList();
        var data = await _googleDistanceMatrix.DistanceMatrixAsync(destinationList, originList);
        return data;

# example
[```](https://maps.googleapis.com/maps/api/distancematrix/json?destinations=42.7101%2C-78.8026%2C42.991077%2C-78.759279&origins=43.004179%2C-78.751965&key=)

Following these steps will guarantee the quickest resolution possible.

Thanks!
jpoehnelt commented 2 years ago

@chrisgrimaldi70 Thank you for opening this issue. 🙏 Please check out these other resources that might be applicable:

This is an automated message, feel free to ignore.

jpoehnelt commented 2 years ago

The specification here lists these params as style: pipeDelimited. Since this repository is only the OpenAPI specification and documentation I am closing this issue. Please open the issue in the tool used to generate the code instead.