moshen / node-googlemaps

A simple way to query the Google Maps API from Node.js
MIT License
559 stars 148 forks source link

Added case-insentive support for the 'mode' argument in both directions() and distance() #36

Closed Kodextor closed 10 years ago

Kodextor commented 10 years ago

This supports mode:UPPERCASE('WALKING',etc.) & mode:LOWERCASE('walking',etc.). Earlier, it was just supporting LOWERCASE('walking','bicycling',etc). I think this is necessary as it gives the developer a little bit of freedom and reduces confusion for starters(like me.. ) :)

Case: Use(argument)->Result(In the JSONresponse) mode = 'WALKING'->"travel_mode":"DRIVING" mode = 'walking'->"travel_mode":"WALKING"

moshen commented 10 years ago

Good call, will merge.

Implements #35

fabriziomoscon commented 10 years ago

@Kodextor I think this is a very good point, but the direction API and implementation has now changed: https://github.com/moshen/node-googlemaps/blob/master/lib/googlemaps.js#L148

Could you rebase your fork in top of master and resubmit it please? I will merge your code