(
        self,
        path,  # type: List[Dict]
        stroke_color="#FF0000",  # type: str
        stroke_opacity=0.8,  # type: float
        stroke_weight=2,  # type: int
        fill_color="#FF0000",  # type: str
        fill_opacity=0.3,  # type: float
    )
return polygon
Set a dictionary with the javascript class Polygon parameters

        This function sets a default drawing configuration if the user just
        pass the polygon path, but also allows to set each parameter
        individually if the user wish so.

        Args:
            path (list): A list of latitude and longitude point for the polygon
            stroke_color (str): Sets the color of the polygon border using
                hexadecimal color notation
            stroke_opacity (float): Sets the opacity of the polygon border
                in percentage. If stroke_opacity = 0, the border is transparent
            stroke_weight (int): Sets the stroke girth in pixels.

            fill_color (str): Sets the color of the polygon fill using
                hexadecimal color notation
            fill_opacity (float): Sets the opacity of the polygon fill
Set a dictionary with the javascript class Polygon parameters
Set a dictionary with the javascript class Polygon parameters
def build_polygon_dict(
        self,
        path,  # type: List[Dict]
        stroke_color="#FF0000",  # type: str
        stroke_opacity=0.8,  # type: float
        stroke_weight=2,  # type: int
        fill_color="#FF0000",  # type: str
        fill_opacity=0.3,  # type: float
    ):
        # type: (...) -> Dict
        """Set a dictionary with the javascript class Polygon parameters

        This function sets a default drawing configuration if the user just
        pass the polygon path, but also allows to set each parameter
        individually if the user wish so.

        Args:
            path (list): A list of latitude and longitude point for the polygon
            stroke_color (str): Sets the color of the polygon border using
                hexadecimal color notation
            stroke_opacity (float): Sets the opacity of the polygon border
                in percentage. If stroke_opacity = 0, the border is transparent
            stroke_weight (int): Sets the stroke girth in pixels.

            fill_color (str): Sets the color of the polygon fill using
                hexadecimal color notation
            fill_opacity (float): Sets the opacity of the polygon fill
        """

        if not isinstance(path, list):
            raise AttributeError(
                "To build a map path a list of dictionaries"
                " of latitude and logitudes is required"
            )

        polygon = {
            "path": path,
            "stroke_color": stroke_color,
            "stroke_opacity": stroke_opacity,
            "stroke_weight": stroke_weight,
            "fill_color": fill_color,
            "fill_opacity": fill_opacity,
        }

        return polygon
def build_polygon_dict ( self , path , # type: List[Dict] stroke_color = "#FF0000" , # type: str stroke_opacity = 0.8 , # type: float stroke_weight = 2 , # type: int fill_color = "#FF0000" , # type: str fill_opacity = 0.3 , # type: float ) : # type: (...) -> Dict if not isinstance ( path , list ) : raise AttributeError ( "To build a map path a list of dictionaries" " of latitude and logitudes is required" ) polygon = { "path" : path , "stroke_color" : stroke_color , "stroke_opacity" : stroke_opacity , "stroke_weight" : stroke_weight , "fill_color" : fill_color , "fill_opacity" : fill_opacity , } return polygon