Skip to content

Commit 7ec3548

Browse files
committed
docs(overlapping_marker_spiderfier): add class description
1 parent c4dd6d2 commit 7ec3548

File tree

1 file changed

+31
-0
lines changed

1 file changed

+31
-0
lines changed

folium/plugins/overlapping_marker_spiderfier.py

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,37 @@
66

77

88
class OverlappingMarkerSpiderfier(JSCSSMixin, Layer):
9+
"""A plugin that handles overlapping markers by spreading them into a spider-like pattern.
10+
11+
This plugin uses the OverlappingMarkerSpiderfier-Leaflet library to manage markers
12+
that are close to each other or overlap. When clicked, the overlapping markers
13+
spread out in a spiral pattern, making them easier to select individually.
14+
15+
Parameters
16+
----------
17+
markers : list, optional
18+
List of markers to be managed by the spiderfier
19+
name : string, optional
20+
Name of the layer control
21+
overlay : bool, default True
22+
Whether the layer will be included in LayerControl
23+
control : bool, default True
24+
Whether the layer will be included in LayerControl
25+
show : bool, default True
26+
Whether the layer will be shown on opening
27+
options : dict, optional
28+
Additional options to be passed to the OverlappingMarkerSpiderfier instance
29+
See https://github.com/jawj/OverlappingMarkerSpiderfier-Leaflet for available options
30+
31+
Example
32+
-------
33+
>>> markers = [marker1, marker2, marker3] # Create some markers
34+
>>> spiderfier = OverlappingMarkerSpiderfier(
35+
... markers=markers, keepSpiderfied=True, nearbyDistance=20
36+
... )
37+
>>> spiderfier.add_to(m) # Add to your map
38+
"""
39+
940
_template = Template(
1041
"""
1142
{% macro script(this, kwargs) %}

0 commit comments

Comments
 (0)