(self, circles)
Process data to construct rectangles

        This method is built from the assumption that the circles parameter
        is a list of:
            lists : a list with 3 elements indicating
                [center_latitude, center_longitude, radius]
            tuples : a tuple with 3 elements indicating
                (center_latitude, center_longitude, radius)
            dicts: a dictionary with circle attributes

        So, for instance, we have this general scenario as a input parameter:
            [[22.345,45.44, 1000],
             (22.345,45.44,200),
             {
            'stroke_color': stroke_color,
            'stroke_opacity': stroke_opacity,
            'stroke_weight': stroke_weight,
            'fill_color': fill_color,
            'fill_opacity': fill_opacity,
            'center': {'lat': center_latitude,
                       'lng': center_longitude,
                       },
            'radius': radius
            }]
Process data to construct rectangles
Process data to construct rectangles
def build_circles(self, circles):
        # type: (Optional[List[Union[List, Tuple, Dict]]]) -> None
        """Process data to construct rectangles

        This method is built from the assumption that the circles parameter
        is a list of:
            lists : a list with 3 elements indicating
                [center_latitude, center_longitude, radius]
            tuples : a tuple with 3 elements indicating
                (center_latitude, center_longitude, radius)
            dicts: a dictionary with circle attributes

        So, for instance, we have this general scenario as a input parameter:
            [[22.345,45.44, 1000],
             (22.345,45.44,200),
             {
            'stroke_color': stroke_color,
            'stroke_opacity': stroke_opacity,
            'stroke_weight': stroke_weight,
            'fill_color': fill_color,
            'fill_opacity': fill_opacity,
            'center': {'lat': center_latitude,
                       'lng': center_longitude,
                       },
            'radius': radius
            }]
        """
        if not circles:
            return
        if not isinstance(circles, list):
            raise AttributeError("circles accepts only lists")

        for circle in circles:
            if isinstance(circle, dict):
                self.add_circle(**circle)
            elif isinstance(circle, (tuple, list)):
                if len(circle) != 3:
                    raise AttributeError("circle requires center and radius")
                circle_dict = self.build_circle_dict(circle[0], circle[1], circle[2])
                self.add_circle(**circle_dict)
def build_circles ( self , circles ) : # type: (Optional[List[Union[List, Tuple, Dict]]]) -> None if not circles : return if not isinstance ( circles , list ) : raise AttributeError ( "circles accepts only lists" ) for circle in circles : if isinstance ( circle , dict ) : self . add_circle ( * * circle ) elif isinstance ( circle , ( tuple , list ) ) : if len ( circle ) != 3 : raise AttributeError ( "circle requires center and radius" ) circle_dict = self . build_circle_dict ( circle [ 0 ] , circle [ 1 ] , circle [ 2 ] ) self . add_circle ( * * circle_dict )