(self, center_lat=None, center_lng=None, radius=None, **kwargs)
Adds a circle dict to the Map.circles attribute

        The circle in a sphere is called "spherical cap" and is defined in the
        Google Maps API by at least the center coordinates and its radius, in
        meters. A circle has color and opacity both for the border line and the
        inside area.

        It accepts a circle dict representation as well.

        Args:
            center_lat (float): The circle center latitude
            center_lng (float): The circle center longitude
            radius  (float): The circle radius, in meters

        .. _Circle:
            https://developers.google.com/maps/documen
            tation/javascript/reference#Circle
Adds a circle dict to the Map.circles attribute
Adds a circle dict to the Map . circles attribute
def add_circle(self, center_lat=None, center_lng=None, radius=None, **kwargs):
        # type: (Optional[float], Optional[float], Optional[float], **Any) -> None
        """Adds a circle dict to the Map.circles attribute

        The circle in a sphere is called "spherical cap" and is defined in the
        Google Maps API by at least the center coordinates and its radius, in
        meters. A circle has color and opacity both for the border line and the
        inside area.

        It accepts a circle dict representation as well.

        Args:
            center_lat (float): The circle center latitude
            center_lng (float): The circle center longitude
            radius  (float): The circle radius, in meters

        .. _Circle:
            https://developers.google.com/maps/documen
            tation/javascript/reference#Circle
        """

        kwargs.setdefault("center", {})
        if center_lat:
            kwargs["center"]["lat"] = center_lat
        if center_lng:
            kwargs["center"]["lng"] = center_lng
        if radius:
            kwargs["radius"] = radius

        if set(("lat", "lng")) != set(kwargs["center"].keys()):
            raise AttributeError("circle center coordinates required")
        if "radius" not in kwargs:
            raise AttributeError("circle radius definition required")

        kwargs.setdefault("stroke_color", "#FF0000")
        kwargs.setdefault("stroke_opacity", 0.8)
        kwargs.setdefault("stroke_weight", 2)
        kwargs.setdefault("fill_color", "#FF0000")
        kwargs.setdefault("fill_opacity", 0.3)

        self.circles.append(kwargs)
def add_circle ( self , center_lat = None , center_lng = None , radius = None , * * kwargs ) : # type: (Optional[float], Optional[float], Optional[float], **Any) -> None kwargs . setdefault ( "center" , { } ) if center_lat : kwargs [ "center" ] [ "lat" ] = center_lat if center_lng : kwargs [ "center" ] [ "lng" ] = center_lng if radius : kwargs [ "radius" ] = radius if set ( ( "lat" , "lng" ) ) != set ( kwargs [ "center" ] . keys ( ) ) : raise AttributeError ( "circle center coordinates required" ) if "radius" not in kwargs : raise AttributeError ( "circle radius definition required" ) kwargs . setdefault ( "stroke_color" , "#FF0000" ) kwargs . setdefault ( "stroke_opacity" , 0.8 ) kwargs . setdefault ( "stroke_weight" , 2 ) kwargs . setdefault ( "fill_color" , "#FF0000" ) kwargs . setdefault ( "fill_opacity" , 0.3 ) self . circles . append ( kwargs )