moshen / node-googlemaps

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

DirectionsStep doesn't have path prop (array of coordinates) #124

Closed jlc467 closed 8 years ago

jlc467 commented 8 years ago

DirectionsStep should have a path prop that contains an array of coordinates for the step in the leg of a route.

https://developers.google.com/maps/documentation/javascript/directions

gm.directions(
  {
    origin: 'Madison , Wi, USA',
    destination: 'Tampa, FL, USA',
    mode: 'driving'
  }, (err, result) => {
    //result.routes[0].legs[0].steps[0].path is undefined
  }
)

It does return the encoded polyline but from my understanding, this is smoother (less accurate) than the actual path coordinates.

encode_polylines: false .. not sure if that matters

jlc467 commented 8 years ago

Nevermind. I was confusing the Google Maps Directions API (used by this library) with Google Maps JavaScript API,

privateOmega commented 7 years ago

@jlc467 can you provide me with a complete example. Thanks.