witnessmenow / arduino-google-maps-api

An Arduino library for communicating with the Google Maps Api
GNU General Public License v2.0
48 stars 20 forks source link

Added units type for Imperial folk #4

Open ghost opened 7 years ago

ghost commented 7 years ago

usage would be the same as calling departure time, destination etc. Default is metric, imperial needs to be called out, would there be a way to make an overload to do this instead?

what would be appended to html request to google maps api. "&units=imperial" "&units=metric"

witnessmenow commented 7 years ago

Hi @captainpabst , Thanks for the PR but there is a change required to the header file too, that's why the build failed

lib/arduino-google-maps-api/src/GoogleMapsApi.cpp:83:8: error: prototype for 'String GoogleMapsApi::distanceMatrix(String, String, String, String, String)' does not match any in class 'GoogleMapsApi' String GoogleMapsApi::distanceMatrix(String origin, String destination, String departureTime, String trafficModel, String units) { ^ In file included from lib/arduino-google-maps-api/src/GoogleMapsApi.cpp:20:0: lib/arduino-google-maps-api/src/GoogleMapsApi.h:41:12: error: candidate is: String GoogleMapsApi::distanceMatrix(String, String, String, String) String distanceMatrix(String origin, String destination, String departureTime = "", String trafficModel = "" );

ghost commented 7 years ago

I thought I changed that as well. Possible I did it won't. Works on my machine. Thanks!

On May 11, 2017 6:19 PM, "Brian Lough" notifications@github.com wrote:

Hi @captainpabst https://github.com/captainpabst , Thanks for the PR but there is a change required to the header file too, that's why the build failed

lib/arduino-google-maps-api/src/GoogleMapsApi.cpp:83:8: error: prototype for 'String GoogleMapsApi::distanceMatrix(String, String, String, String, String)' does not match any in class 'GoogleMapsApi' String GoogleMapsApi::distanceMatrix(String origin, String destination, String departureTime, String trafficModel, String units) { ^ In file included from lib/arduino-google-maps-api/ src/GoogleMapsApi.cpp:20:0: lib/arduino-google-maps-api/src/GoogleMapsApi.h:41:12: error: candidate is: String GoogleMapsApi::distanceMatrix(String, String, String, String) String distanceMatrix(String origin, String destination, String departureTime = "", String trafficModel = "" );

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/witnessmenow/arduino-google-maps-api/pull/4#issuecomment-300932540, or mute the thread https://github.com/notifications/unsubscribe-auth/AUQ2eRzrFiVcA5uJJ2iZtXbTlikaiqXUks5r44lZgaJpZM4NSg70 .