node.js - Google maps directions from A to B considering traffic -


is there way google maps directions b considering traffic @ moment of calling function?

this code below works fine if empty road:

var gm = require("googlemaps");  gm.directions("from", "where go to" , function ( err, data ) {     console.log(data.routes[0].legs[0].distance);     console.log(data.routes[0].legs[0].duration); }, "false"); 

i new google maps, please thought spare?

a quick @ documentation gives clear answer:

durationintraffic (optional) specifies whether directionsleg result should include duration takes account current traffic conditions. feature only available maps business customers. time in current traffic returned if traffic information available in requested area.


Comments

Popular posts from this blog

android - Get AccessToken using signpost OAuth without opening a browser (Two legged Oauth) -

org.mockito.exceptions.misusing.InvalidUseOfMatchersException: mockito -

google shop client API returns 400 bad request error while adding an item -