Skip to content

Commit 8fd7b9f

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent ca4c4b8 commit 8fd7b9f

2 files changed

Lines changed: 7 additions & 10 deletions

File tree

docs/user_guide/geojson/coordinate_ordering.md

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ geojson_data = {
2525
"type": "Feature",
2626
"geometry": {
2727
"type": "Point",
28-
"coordinates": [-87.6298, 41.8781] # longitude, latitude (Chicago)
29-
}
28+
"coordinates": [-87.6298, 41.8781], # longitude, latitude (Chicago)
29+
},
3030
}
3131

3232
# Folium map with correct [lat, lon] order
@@ -49,8 +49,8 @@ geojson_data = {
4949
"type": "Feature",
5050
"geometry": {
5151
"type": "Point",
52-
"coordinates": [41.8781, -87.6298] # WRONG: latitude, longitude
53-
}
52+
"coordinates": [41.8781, -87.6298], # WRONG: latitude, longitude
53+
},
5454
}
5555

5656
m = folium.Map(location=[41.8781, -87.6298], zoom_start=12)
@@ -75,10 +75,7 @@ correct_order = [wrong_order[1], wrong_order[0]]
7575

7676
geojson_data = {
7777
"type": "Feature",
78-
"geometry": {
79-
"type": "Point",
80-
"coordinates": correct_order # now [lon, lat]
81-
}
78+
"geometry": {"type": "Point", "coordinates": correct_order}, # now [lon, lat]
8279
}
8380

8481
m = folium.Map(location=[correct_order[1], correct_order[0]], zoom_start=12)

folium/features.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -676,7 +676,7 @@ def __init__(
676676
popup_keep_highlighted: bool = False,
677677
name: Optional[str] = None,
678678
overlay: bool = True,
679-
control: bool = True,
679+
control: bool = True,
680680
show: bool = True,
681681
smooth_factor: Optional[float] = None,
682682
tooltip: Union[str, Tooltip, "GeoJsonTooltip", None] = None,
@@ -852,7 +852,7 @@ def render(self, **kwargs):
852852
if self.highlight:
853853
self.highlight_map = mapper.get_highlight_map(self.highlight_function)
854854
super().render()
855-
855+
856856

857857
TypeStyleMapping = dict[str, Union[str, list[Union[str, int]]]]
858858

0 commit comments

Comments
 (0)