class_docstr: Create two maps in the same window.
  
  Adding children to this objects adds them to both maps. You can access
  the individual maps with `DualMap.m1` and `DualMap.m2`.
  
  Uses the Leaflet plugin Sync: https://github.com/jieter/Leaflet.Sync
  
  Parameters
  ----------
  location: tuple or list, optional
      Latitude and longitude of center point of the maps.
  layout : {'horizontal', 'vertical'}
      Select how the two maps should be positioned. Either horizontal (left
      and right) or vertical (top and bottom).
  **kwargs
      Keyword arguments are passed to the two Map objects.
  
  Examples
  --------
  >>> # DualMap accepts the same arguments as Map:
  >>> m = DualMap(location=(0, 0), tiles="cartodbpositron", zoom_start=5)
  >>> # Add the same marker to both maps:
  >>> Marker((0, 0)).add_to(m)
  >>> # The individual maps are attributes called `m1` and `m2`:
  >>> Marker((0, 1)).add_to(m.m1)
  >>> LayerControl().add_to(m)
  >>> m.save("map.html")
class_docstr_tok: ["Create","two","maps","in","the","same","window",".","Adding","children","to","this","objects","adds","them","to","both","maps",".","You","can","access","the","individual","maps","with","`","DualMap.m1","`","and","`","DualMap.m2","`",".","Uses","the","Leaflet","plugin","Sync",":","https",":","\/\/github.com\/jieter\/Leaflet.Sync","Parameters","--","--","--","--","--","location",":","tuple","or","list",",","optional","Latitude","and","longitude","of","center","point","of","the","maps",".","layout",":","{","'horizontal","'",",","'vertical","'","}","Select","how","the","two","maps","should","be","positioned",".","Either","horizontal","(","left","and","right",")","or","vertical","(","top","and","bottom",")",".","*","*","kwargs","Keyword","arguments","are","passed","to","the","two","Map","objects",".","Examples","--","--","--","--",">",">",">","#","DualMap","accepts","the","same","arguments","as","Map",":",">",">",">","m","=","DualMap","(","location=","(","0",",","0",")",",","tiles=","''","cartodbpositron","''",",","zoom_start=5",")",">",">",">","#","Add","the","same","marker","to","both","maps",":",">",">",">","Marker","(","(","0",",","0",")",")",".add_to","(","m",")",">",">",">","#","The","individual","maps","are","attributes","called","`","m1","`","and","`","m2","`",":",">",">",">","Marker","(","(","0",",","1",")",")",".add_to","(","m.m1",")",">",">",">","LayerControl","(",")",".add_to","(","m",")",">",">",">","m.save","(","``","map.html","''",")"]
code: def __init__(self, location=None, layout="horizontal", **kwargs):
      super().__init__()
      for key in ("width", "height", "left", "top", "position"):
          assert (
              key not in kwargs
          ), f"Argument {key} cannot be used with  DualMap."
      if layout not in ("horizontal", "vertical"):
          raise ValueError(
              f"Undefined option for argument `layout`: {layout}. "
              "Use either 'horizontal' or 'vertical'."
          )
      width = "50%" if layout == "horizontal" else "100%"
      height = "100%" if layout == "horizontal" else "50%"
      self.m1 = Map(
          location=location,
          width=width,
          height=height,
          left="0%",
          top="0%",
          position="absolute",
          **kwargs,
      )
      self.m2 = Map(
          location=location,
          width=width,
          height=height,
          left="50%" if layout == "horizontal" else "0%",
          top="0%" if layout == "horizontal" else "50%",
          position="absolute",
          **kwargs,
      )
      figure = Figure()
      figure.add_child(self.m1)
      figure.add_child(self.m2)
      # Important: add self to Figure last.
      figure.add_child(self)
      self.children_for_m2 = []
      self.children_for_m2_copied = []
  
file_path: folium/folium/plugins/dual_map.py
imports: from branca.element import Figure, MacroElement
  from jinja2 import Template
  from folium.elements import JSCSSMixin
  from folium.folium import Map
  from folium.map import LayerControl
  from folium.utilities import deep_copy
label_desc: Use image node_id 1 to create a new DualMap object from inherited base classes: JSCSSMixin, MacroElement with example: obj = DualMap(location, layout)