class_docstr: Traitlet defining the initial viewport for a map.
class_docstr_tok: ["Traitlet","defining","the","initial","viewport","for","a","map","."]
docstr: Create a viewport by explicitly setting the zoom and center
  
  Most of the time, you should rely on the defaults provided by the
  :func:`gmaps.figure` factory method, rather than creating a
  viewport yourself.
  
  :param zoom_level:
      The zoom level for the map. A value between 0 (zoomed out) and
      21 (zoomed in). Note that the highest zoom levels are only
      available in some regions of the world (e.g. cities).
  :type zoom_level: int
  
  :param center:
      (Latitude, longitude) pair denoting the map center.
  :type center: tuple of floats
  
  :Examples:
  
  >>> zoom_level = 8
  >>> center = (20.0, -10.0)
  >>> viewport = InitialViewport.from_zoom_center(zoom_level, center)
  >>> m = gmaps.figure(initial_viewport=viewport)
docstr_tok: ["Create","a","viewport","by","explicitly","setting","the","zoom","and","center","Most","of","the","time",",","you","should","rely","on","the","defaults","provided","by","the",":","func",":","`","gmaps.figure","`","factory","method",",","rather","than","creating","a","viewport","yourself",".",":","param","zoom_level",":","The","zoom","level","for","the","map",".","A","value","between","0","(","zoomed","out",")","and","21","(","zoomed","in",")",".","Note","that","the","highest","zoom","levels","are","only","available","in","some","regions","of","the","world","(","e.g",".","cities",")",".",":","type","zoom_level",":","int",":","param","center",":","(","Latitude",",","longitude",")","pair","denoting","the","map","center",".",":","type","center",":","tuple","of","floats",":","Examples",":",">",">",">","zoom_level","=","8",">",">",">","center","=","(","20.0",",","-10.0",")",">",">",">","viewport","=","InitialViewport.from_zoom_center","(","zoom_level",",","center",")",">",">",">","m","=","gmaps.figure","(","initial_viewport=viewport",")"]
code: def from_zoom_center(zoom_level, center):
      """
      Create a viewport by explicitly setting the zoom and center
  
      Most of the time, you should rely on the defaults provided by the
      :func:`gmaps.figure` factory method, rather than creating a
      viewport yourself.
  
      :param zoom_level:
          The zoom level for the map. A value between 0 (zoomed out) and
          21 (zoomed in). Note that the highest zoom levels are only
          available in some regions of the world (e.g. cities).
      :type zoom_level: int
  
      :param center:
          (Latitude, longitude) pair denoting the map center.
      :type center: tuple of floats
  
      :Examples:
  
      >>> zoom_level = 8
      >>> center = (20.0, -10.0)
      >>> viewport = InitialViewport.from_zoom_center(zoom_level, center)
      >>> m = gmaps.figure(initial_viewport=viewport)
      """
      return _ZoomCenter(zoom_level=zoom_level, center=center)
  
imports: import ipywidgets
  from traitlets import Unicode, default, List, Instance, observe, Dict, HasTraits, Enum, Union
  from .bounds import merge_longitude_bounds
  from .geotraitlets import Point, ZoomLevel, MapType, MouseHandling, Tilt
  from ._docutils import doc_subst
  from ._version import CLIENT_VERSION
label_desc: Use image node_id 3 for calling the InitialViewport obj's underlying member method code with example usage: obj.from_zoom_center(zoom_level, center) and returns: _ZoomCenter