Skip to content

Commit b8e44f7

Browse files
Martin Journoisocefpaf
authored andcommitted
Fix heatmap.fit_bounds (same bug as #383)
1 parent 9e2926d commit b8e44f7

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

folium/plugins/heat_map.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -91,12 +91,12 @@ def _get_self_bounds(self):
9191
for point in self.data:
9292
bounds = [
9393
[
94-
none_min(bounds[0][0], point[1]),
95-
none_min(bounds[0][1], point[0]),
94+
none_min(bounds[0][0], point[0]),
95+
none_min(bounds[0][1], point[1]),
9696
],
9797
[
98-
none_max(bounds[1][0], point[1]),
99-
none_max(bounds[1][1], point[0]),
98+
none_max(bounds[1][0], point[0]),
99+
none_max(bounds[1][1], point[1]),
100100
],
101101
]
102102
return bounds

tests/plugins/test_heat_map.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,5 +44,5 @@ def test_heat_map():
4444
assert tmpl.render(this=hm)
4545

4646
bounds = m.get_bounds()
47-
assert bounds == [[3.0302801394447734, 46.218566840847025],
48-
[7.132453997672826, 50.75345011431167]], bounds
47+
assert bounds == [[46.218566840847025, 3.0302801394447734],
48+
[50.75345011431167, 7.132453997672826]], bounds

0 commit comments

Comments
 (0)