Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions docs/user_guide/geojson/geojson_advanced_on_each_feature.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,9 @@ import folium

The `on_each_feature` parameter in `folium.GeoJson` provides powerful customization capabilities by allowing you to execute JavaScript code for each feature in your GeoJSON data. This is particularly useful for:

- Custom tooltip and popup handling for complex geometries like MultiPoint
- Building tooltip or popup content in JavaScript from feature properties
- Adding custom event listeners
- Implementing advanced styling logic
- Working with geometry types that need special handling

## Understanding on_each_feature

Expand Down Expand Up @@ -70,7 +69,7 @@ folium.GeoJson(
m
```

The `on_each_feature` parameter provides the flexibility needed to handle complex GeoJSON scenarios that the standard tooltip and popup classes cannot address, particularly for MultiPoint geometries and advanced interactive features.
The `on_each_feature` parameter gives you direct access to each Leaflet layer, which is useful when you need behavior beyond what `GeoJsonTooltip` and `GeoJsonPopup` provide.

## References

Expand Down
2 changes: 1 addition & 1 deletion docs/user_guide/geojson/geojson_popup_and_tooltip.md
Original file line number Diff line number Diff line change
Expand Up @@ -139,4 +139,4 @@ m
```


The standard `GeoJsonPopup` and `GeoJsonTooltip` classes work well with most geometry types, but have limitations with MultiPoint and other complex multigeometries. For these cases, consider using the `on_each_feature` parameter for custom handling. See the [doc](geojson_advanced_on_each_feature.md) for more information.
For advanced cases — custom event listeners, conditional styling, or building tooltip content in JavaScript — see the `on_each_feature` parameter in [the advanced guide](geojson_advanced_on_each_feature.md).
Loading