Skip to content

Commit aff92a8

Browse files
committed
Merge pull request #384 from BibMartin/issue383bis
Fix heatmap.fit_bounds (same bug as #383)
2 parents be6d981 + b26a6e3 commit aff92a8

2 files changed

Lines changed: 6 additions & 6 deletions

File tree

folium/plugins/heat_map.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -92,12 +92,12 @@ def _get_self_bounds(self):
9292
for point in self.data:
9393
bounds = [
9494
[
95-
none_min(bounds[0][0], point[1]),
96-
none_min(bounds[0][1], point[0]),
95+
none_min(bounds[0][0], point[0]),
96+
none_min(bounds[0][1], point[1]),
9797
],
9898
[
99-
none_max(bounds[1][0], point[1]),
100-
none_max(bounds[1][1], point[0]),
99+
none_max(bounds[1][0], point[0]),
100+
none_max(bounds[1][1], point[1]),
101101
],
102102
]
103103
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)