code: function buildDirectionsQuery(state) {
    const { origin, destination, waypoints } = state();
  
    let query = [];
    query.push((origin.geometry.coordinates).join(','));
    query.push(';');
  
    // Add any waypoints.
    if (waypoints.length) {
      waypoints.forEach((waypoint) => {
        query.push((waypoint.geometry.coordinates).join(','));
        query.push(';');
      });
    }
  
    query.push((destination.geometry.coordinates).join(','));
    return encodeURIComponent(query.join(''));
  }
docs: /*
  Build query used to fetch directions
  
  @param {Function} state