B
    @\                  @   s
  d dl mZmZmZmZ d dlZeeZd dl	m
Z
 ddlmZmZ ddlmZmZmZmZmZmZmZ ddlmZmZmZmZmZmZmZ ddlmZmZ dd	l m!Z!m"Z"m#Z#m$Z$ dd
l%m&Z& ddl'm(Z(m)Z)m*Z* dZ+dZ,G dd deZ-dd Z.G dd de&Z/dS )    )absolute_importdivisionprint_functionunicode_literalsN)string_types   )HorizontalLocationVerticalLocation)AutoEitherEnumIntSeqInstanceString)GMapPlot
LinearAxisMercatorTickerMercatorTickFormatterRange1dTitleTool)glyphsmarkers)Drag
InspectionScrollTap)Options   )_process_tools_arg_process_active_tools_glyph_functionzpan,wheel_zoom,reset,help)GMapGMapFigureOptionsgmapc                   s  e Zd ZdZd ZdZ fddZeej	Z
eejZeejZeejZeejZeejZeejZeejZeejZeejZeejZeej Z!eej"Z#eej$Z%eej&Z'eej(Z)eej*Z+eej,Z-eej.Z/eej0Z1eej2Z3eej4Z5eej6Z7eej8Z9eej:Z;eej<Z=eej>Z?eej@ZAeejBZCeejDZEeejFZGeejHZIeejJZKeejLZMeejNZOeejPZQeejRZS  ZTS )r#   a   A subclass of :class:`~bokeh.models.plots.Plot` that simplifies plot
    creation with default axes, grids, tools, etc.

    Args:
        google_api_key (str):
            Google requires an API key be supplied for maps to function. See:

            https://developers.google.com/maps/documentation/javascript/get-api-key

        map_options: (GMapOptions)
            Configuration specific to a Google Map

    In addition to all the Bokeh model property attributes documented below,
    the ``Figure`` initializer also accepts the following options, which can
    help simplify configuration:

    .. bokeh-options:: GMapFigureOptions
        :module: bokeh.plotting.figure

    r   c       
         s2  d|krd|krt dd|kr0d|kr0t dd|krF|d|d< d|kr\|d|d< t|}|dd }t|trt|d|d< tt| j	f t
 t
 d	| td
d}td
d}| t||dd tdd}tdd}| t||dd t| |j\}}	| j|  t| j|	|j|j|j|j d S )NZ
plot_widthwidthzJFigure called with both 'plot_width' and 'width' supplied, supply only oneZplot_heightZheightzLFigure called with both 'plot_height' and 'height' supplied, supply only onetitle)text)Zx_rangeZy_rangeZlon)Z	dimension)Z	formatterZtickerbelowZlatleft)
ValueErrorpopr$   get
isinstancer   r   superr#   __init__r   r   r   Z
add_layoutr   r    toolsZ	add_toolsr!   Ztoolbaractive_dragactive_inspectactive_scroll
active_tap)
selfkwZoptsr'   ZxfZxtZyfZytZ	tool_objsZtool_map)	__class__ 2lib/python3.7/site-packages/bokeh/plotting/gmap.pyr0   K   s,    
 




zGMap.__init__)U__name__
__module____qualname____doc__Z__subtype__Z__view_model__r0   r"   r   ZAnnularWedgeZannular_wedgeZAnnulusZannulusZArcZarcr   ZAsteriskZasteriskZBezierZbezierZCircleZcircleZCircleCrossZcircle_crossZCircleXZcircle_xZCrossZcrossZDashZdashZDiamondZdiamondZDiamondCrossZdiamond_crossZHBarZhbarZEllipseZellipseZImageZimageZ	ImageRGBAZ
image_rgbaZImageURLZ	image_urlZInvertedTriangleZinverted_triangleZLinelineZ	MultiLineZ
multi_lineZMultiPolygonsZmulti_polygonsZOvalZovalZPatchZpatchZPatchesZpatchesZQuadZquadZ	QuadraticZ	quadraticZRayZrayZRectZrectZSegmentZsegmentZSquareZsquareZSquareCrossZsquare_crossZSquareXZsquare_xZTextr(   ZTriangleZtriangleZVBarZvbarZWedgeZwedgeXx__classcell__r9   r9   )r8   r:   r#   2   sR   



































r#   c             K   s   t f | |d|S )a   Create a new :class:`~bokeh.plotting.gmap.GMap` for plotting.

    Args:
        google_api_key (str):
            Google requires an API key be supplied for maps to function. See:

            https://developers.google.com/maps/documentation/javascript/get-api-key

        map_options: (GMapOptions)
            Configuration specific to a Google Map

    In addition to the standard :class:`~bokeh.plotting.gmap.GMap` keyword
    arguments (e.g. ``plot_width`` or ``sizing_mode``), the following
    additional options can be passed as well:

    .. bokeh-options:: GMapFigureOptions
        :module: bokeh.plotting.gmap

    Returns:
       GMap

    )Zapi_keymap_options)r#   )Zgoogle_api_keyrC   kwargsr9   r9   r:   r%      s    r%   c               @   s   e Zd ZeeeeeeeeddZ	ee
edddZee
edddZeedddZeedd	dZed
ddZed
ddZee
eeedddZee
eeeeeedddZee
eeedddZee
eeedddZdS )r$   z+
    Tools the plot should start with.
    )defaulthelpautozD
    Number of minor ticks between adjacent x-axis major ticks.
    zD
    Number of minor ticks between adjacent y-axis major ticks.
    r)   z-
    Where the x-axis should be located.
    r*   z-
    Where the y-axis should be located.
     z!
    A label for the x-axis.
    z!
    A label for the y-axis.
    z5
    Which drag tool should initially be active.
    z7
    Which scroll tool should initially be active.
    z4
    Which tap tool should initially be active.
    N)r;   r<   r=   r   r   r   r   r   DEFAULT_TOOLSr1   r
   r   Zx_minor_ticksZy_minor_ticksr   r	   Zx_axis_locationr   Zy_axis_locationZx_axis_labelZy_axis_labelr   r2   r   r3   r   r4   r   r5   r9   r9   r9   r:   r$      s,   r$   )0Z
__future__r   r   r   r   ZloggingZ	getLoggerr;   logZsixr   Z
core.enumsr   r	   Zcore.propertiesr
   r   r   r   r   r   r   Zmodelsr   r   r   r   r   r   r   r   r   Zmodels.toolsr   r   r   r   Zutil.optionsr   Zhelpersr    r!   r"   rI   __all__r#   r%   r$   r9   r9   r9   r:   <module>   s    
	$$	 