class_docstr: Directions layer.
  
  Add this to a :class:`gmaps.Figure` instance to draw directions.
  
  Use the :func:`gmaps.directions_layer` factory function to
  instantiate this class, rather than the constructor.
  
  :Examples:
  
  {examples}
  
  {params}
class_docstr_tok: ["Directions","layer",".","Add","this","to","a",":","class",":","`","gmaps.Figure","`","instance","to","draw","directions",".","Use","the",":","func",":","`","gmaps.directions_layer","`","factory","function","to","instantiate","this","class",",","rather","than","the","constructor",".",":","Examples",":","{","examples","}","{","params","}"]
code: def __init__(self, start=None, end=None, waypoints=None, **kwargs):
      if kwargs.get("data") is not None:
          _warn_obsolete_data()
          # Keep for backwards compatibility with data argument
          data = kwargs["data"]
          waypoints = kwargs.get("waypoints")
          if start is None and end is None and waypoints is None:
              start, end, waypoints = Directions._destructure_data(data)
              kwargs.update(
                  dict(
                      start=start,
                      end=end,
                      waypoints=waypoints,
                      data=None,
                  )
              )
          else:
              raise ValueError(
                  'Cannot set both data and one of "start", "end"'
                  'or "waypoints".'
              )
      else:
          if waypoints is None:
              waypoints = []
          kwargs.update(dict(start=start, end=end, waypoints=waypoints))
      super(Directions, self).__init__(**kwargs)
  
file_path: gmaps/gmaps/directions.py
imports: import ipywidgets
  import warnings
  from traitlets import Bool, Unicode, CUnicode, List, Enum, observe, validate, Float
  from .None import geotraitlets
  from .maps import GMapsWidgetMixin
  from ._docutils import doc_subst
label_desc: Use image node_id 1 to create a new Directions object from inherited base classes: GMapsWidgetMixin, widgets with example: obj = Directions(start, end, waypoints)