(self, north=None, west=None, south=None, east=None, **kwargs)
Adds a rectangle dict to the Map.rectangles attribute

        The Google Maps API describes a rectangle using the LatLngBounds
        object, which defines the bounds to be drawn. The bounds use the
        concept of 2 delimiting points, a northwest and a southeast points,
        were each coordinate is defined by each parameter.

        It accepts a rectangle dict representation as well.

        Args:
            north (float): The north latitude
            west (float): The west longitude
            south (float): The south latitude
            east (float): The east longitude

        .. _LatLngBoundsLiteral:
            https://developers.google.com/maps/documen
            tation/javascript/reference#LatLngBoundsLiteral

        .. _Rectangles:
            https://developers.google.com/maps/documen
            tation/javascript/shapes#rectangles
Adds a rectangle dict to the Map.rectangles attribute
Adds a rectangle dict to the Map . rectangles attribute
def add_rectangle(self, north=None, west=None, south=None, east=None, **kwargs):
        # type: (Optional[float], Optional[float], Optional[float], Optional[float], **Any) -> None
        """Adds a rectangle dict to the Map.rectangles attribute

        The Google Maps API describes a rectangle using the LatLngBounds
        object, which defines the bounds to be drawn. The bounds use the
        concept of 2 delimiting points, a northwest and a southeast points,
        were each coordinate is defined by each parameter.

        It accepts a rectangle dict representation as well.

        Args:
            north (float): The north latitude
            west (float): The west longitude
            south (float): The south latitude
            east (float): The east longitude

        .. _LatLngBoundsLiteral:
            https://developers.google.com/maps/documen
            tation/javascript/reference#LatLngBoundsLiteral

        .. _Rectangles:
            https://developers.google.com/maps/documen
            tation/javascript/shapes#rectangles
        """
        kwargs.setdefault("bounds", {})

        if north:
            kwargs["bounds"]["north"] = north
        if west:
            kwargs["bounds"]["west"] = west
        if south:
            kwargs["bounds"]["south"] = south
        if east:
            kwargs["bounds"]["east"] = east

        if set(("north", "east", "south", "west")) != set(kwargs["bounds"].keys()):
            raise AttributeError("rectangle bounds required to rectangles")

        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.rectangles.append(kwargs)
def add_rectangle ( self , north = None , west = None , south = None , east = None , * * kwargs ) : # type: (Optional[float], Optional[float], Optional[float], Optional[float], **Any) -> None kwargs . setdefault ( "bounds" , { } ) if north : kwargs [ "bounds" ] [ "north" ] = north if west : kwargs [ "bounds" ] [ "west" ] = west if south : kwargs [ "bounds" ] [ "south" ] = south if east : kwargs [ "bounds" ] [ "east" ] = east if set ( ( "north" , "east" , "south" , "west" ) ) != set ( kwargs [ "bounds" ] . keys ( ) ) : raise AttributeError ( "rectangle bounds required to rectangles" ) 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 . rectangles . append ( kwargs )