moshen / node-googlemaps

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

Qry : direction, only alternatives=true, rest all default option #17

Closed raxitsheth closed 11 years ago

raxitsheth commented 11 years ago

Hi

How to provide only alternatives direction = true in call, and rest all as default options? Currently i am directly modifying src code, but is there any way without doing it?

PS : this is not a bug, but query.

Thanks raxit

moshen commented 11 years ago

something like:

var gm = require("googlemaps");

gm.directions('somewhere', 'somewhere', function(err, data){
  if( err ){
    console.log(err);
  } else {
    console.log(data);
  }
}, undefined, undefined, undefined, true);

Is it elegant? No, I wrote this module a while ago and have yet to revise the api to use an object for options.

raxitsheth commented 11 years ago

Thanks!

moshen commented 11 years ago

No problem. :+1: