(
self,
locations=None,
popups=None,
icons=None,
name=None,
overlay=True,
control=True,
show=True,
icon_create_function=None,
options=None,
**kwargs
)
| 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 |
nothing calls this directly
no test coverage detected