MCPcopy Index your code
hub / github.com/python-visualization/folium / __init__

Method __init__

folium/plugins/marker_cluster.py:78–108  ·  view source on GitHub ↗
(
        self,
        locations=None,
        popups=None,
        icons=None,
        name=None,
        overlay=True,
        control=True,
        show=True,
        icon_create_function=None,
        options=None,
        **kwargs
    )

Source from the content-addressed store, hash-verified

76 ]
77
78 def __init__(
79 self,
80 locations=None,
81 popups=None,
82 icons=None,
83 name=None,
84 overlay=True,
85 control=True,
86 show=True,
87 icon_create_function=None,
88 options=None,
89 **kwargs
90 ):
91 if options is not None:
92 kwargs.update(options) # options argument is legacy
93 super().__init__(name=name, overlay=overlay, control=control, show=show)
94 self._name = "MarkerCluster"
95
96 if locations is not None:
97 locations = validate_locations(locations)
98 for i, location in enumerate(locations):
99 self.add_child(
100 Marker(
101 location, popup=popups and popups[i], icon=icons and icons[i]
102 )
103 )
104
105 self.options = remove_empty(**kwargs)
106 if icon_create_function is not None:
107 assert isinstance(icon_create_function, str)
108 self.icon_create_function = icon_create_function

Callers

nothing calls this directly

Calls 4

validate_locationsFunction · 0.90
MarkerClass · 0.90
remove_emptyFunction · 0.90
add_childMethod · 0.45

Tested by

no test coverage detected