{"repo":"Skalar/google_distance_matrix","free":true,"listed":false,"github":"https://github.com/Skalar/google_distance_matrix","clone":"git clone https://github.com/Skalar/google_distance_matrix.git","description":"Ruby client for The Google Distance Matrix API.","language":"Ruby","stars":59,"topics":["google-distance-matrix","ruby-client","distancematrix","ruby","matrix"],"license":"MIT","category":"chat-messaging","readme_excerpt":"GoogleDistanceMatrix Ruby client for the Google Distance Matrix API. This lib makes Google's distance matrix API easy to work with, allowing you to set up some origins and destinations and pull the distance matrix from Google. Once you have the matrix you can fetch all routes from a given origin or to a given destination. Examples Set up a matrix to work with Create some places to be used as origins or destinations for the matrix Add places to matrix's origins and destinations Do some configuration - see GoogleDistanceMatrix.configure defaults as well. Get the data for the matrix matrix.data returns the data, loaded from Google, for this matrix. It is a multi dimensional array. Rows are ordered according to the values in the origins. Each row corresponds to an origin, and each element within that row corresponds to a pairing of the origin with a destination. Query the matrix Returns an array of Google::DistanceMatrix::Route, all having given origin or destination. Returns Google::DistanceMatrix::Route with given origin and destination In cases where you built the place with an object (not hash with attributes) you may provide that object as well asking for routes. This is true for route for and shortest route by as well. You may call query methods with a bang, in which case it will fail with an error if not all of the routes in your result set for the called method are ok. Installation Add this line to your application's Gemfile: And then execute: $ bundle Or install it yours","default_branch":null,"files":null,"tree":[],"storefront":"/r/Skalar","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/Skalar/google_distance_matrix/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}