Skip to content

Commit c4dd6d2

Browse files
committed
docs(plugins): update overlapping_marker_spiderfier to align with plugin conventions
1 parent 5c245ef commit c4dd6d2

File tree

2 files changed

+2
-36
lines changed

2 files changed

+2
-36
lines changed

docs/user_guide/plugins.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ Plugins
2121
plugins/mini_map
2222
plugins/measure_control
2323
plugins/mouse_position
24+
plugins/overlapping_marker_spiderfier
2425
plugins/pattern
2526
plugins/polygon_encoded
2627
plugins/polyline_encoded
Lines changed: 1 addition & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,6 @@
11
# OverlappingMarkerSpiderfier
22

3-
The `OverlappingMarkerSpiderfier` plugin for Folium is designed to handle overlapping markers on a map. When multiple markers are located at the same or nearby coordinates, they can overlap, making it difficult to interact with individual markers. This plugin "spiderfies" the markers, spreading them out in a spider-like pattern, allowing users to easily click and view each marker.
4-
5-
## Features
6-
7-
- **Spiderfying**: Automatically spreads out overlapping markers into a spider-like pattern when clicked, making them individually accessible.
8-
- **Customizable Options**: Offers options to customize the behavior and appearance of the spiderfied markers, such as `keepSpiderfied`, `nearbyDistance`, and `legWeight`.
9-
- **Popup Integration**: Supports popups for each marker, which can be customized to display additional information.
10-
- **Layer Control**: Can be added as a layer to the map, allowing users to toggle its visibility.
11-
12-
## Usage
13-
14-
To use the `OverlappingMarkerSpiderfier`, you need to create a list of `folium.Marker` objects and pass them to the plugin. You can also customize the options to suit your needs.
15-
16-
### Example
17-
18-
```python
3+
```{code-cell} ipython3
194
import folium
205
from folium import plugins
216
@@ -25,7 +10,6 @@ m = folium.Map(location=[45.05, 3.05], zoom_start=14)
2510
# Generate some markers
2611
markers = [folium.Marker(location=[45.05 + i * 0.0001, 3.05 + i * 0.0001], options={'desc': f'Marker {i}'}) for i in range(10)]
2712
28-
2913
# Add markers to the map
3014
for marker in markers:
3115
marker.add_to(m)
@@ -38,22 +22,3 @@ oms = plugins.OverlappingMarkerSpiderfier(
3822
3923
# Display the map
4024
m
41-
```
42-
43-
## Options
44-
45-
- **keepSpiderfied**: (bool) Whether to keep the markers spiderfied after clicking.
46-
- **nearbyDistance**: (int) The distance in pixels within which markers are considered overlapping.
47-
- **legWeight**: (float) The weight of the spider legs connecting the markers.
48-
49-
## Installation
50-
51-
Ensure you have Folium installed in your Python environment. You can install it using pip:
52-
53-
```bash
54-
pip install folium
55-
```
56-
57-
## Conclusion
58-
59-
The `OverlappingMarkerSpiderfier` plugin is a powerful tool for managing overlapping markers on a map, enhancing the user experience by making it easier to interact with individual markers. Customize it to fit your application's needs and improve the clarity of your map visualizations.

0 commit comments

Comments
 (0)