Google Maps Distance Matrix API ASP.Net

1331
Google Maps Distance Matrix API ASP.Net

Google maps distance matrix API C#

Google’s Distance Matrix service computes travel distance and journey duration between multiple origins and destinations using a given mode of travel. This google maps distance matrix API service does not return detailed route information.

Note: Route information, including polylines and textual directions, can be obtained by passing the desired single origin and destination to the Directions Service.

Google maps distance matrix API key

You must add an API key from your Google Maps APIs Premium Plan project, if you want to include thedrivingOptions field in the DistanceMatrixRequest.

Google maps distance matrix API limits

  • 2,500 free elements per day, calculated as the sum of client-side and server-side queries.

Travel Modes

  • BICYCLING requests bicycling directions via bicycle paths & preferred streets (currently only available in the US and some Canadian cities).
  • DRIVING (default) indicates standard driving directions using the road network.
  • TRANSIT requests directions via public transit routes. This option may only be specified if the request includes an API key. See the section on transit options for the available options in this type of request.
  • WALKING requests walking directions via pedestrian paths & sidewalks (where available).

Google maps distance matrix API example

Result

google maps distance matrix api example

Download Source Code

Did you find this post useful? I hope you liked this article. Please share with me your valuable suggestions and feedback.

1 COMMENT

  1. Thanks for the great article. YOur code works fine. I have not used the sign part but with my API key, it works fine.

LEAVE A REPLY

Please enter your comment!
Please enter your name here