|
6 | 6 |
|
7 | 7 |
|
8 | 8 | 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 | + |
9 | 40 | _template = Template(
|
10 | 41 | """
|
11 | 42 | {% macro script(this, kwargs) %}
|
|
0 commit comments