Skip to content

Commit dfe11b6

Browse files
committed
Merge pull request #386 from ocefpaf/v0.2.1
Second try v0.2.1
2 parents a911d2f + b8e44f7 commit dfe11b6

File tree

4 files changed

+12
-12
lines changed

4 files changed

+12
-12
lines changed

folium/features.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -507,12 +507,12 @@ def _get_self_bounds(self):
507507
ymax = none_max(y, ymax)
508508
return [
509509
[
510-
self.data['transform']['translate'][0] + self.data['transform']['scale'][0] * xmin, # noqa
511510
self.data['transform']['translate'][1] + self.data['transform']['scale'][1] * ymin, # noqa
511+
self.data['transform']['translate'][0] + self.data['transform']['scale'][0] * xmin # noqa
512512
],
513513
[
514-
self.data['transform']['translate'][0] + self.data['transform']['scale'][0] * xmax, # noqa
515514
self.data['transform']['translate'][1] + self.data['transform']['scale'][1] * ymax, # noqa
515+
self.data['transform']['translate'][0] + self.data['transform']['scale'][0] * xmax # noqa
516516
]
517517

518518
]

folium/plugins/heat_map.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ def __init__(self, data, name=None, min_opacity=0.5, max_zoom=18,
4040
gradient : dict, default None
4141
Color gradient config. e.g. {0.4: 'blue', 0.65: 'lime', 1: 'red'}
4242
"""
43-
super(TileLayer, self).__init__()
43+
super(TileLayer, self).__init__(name=name)
4444
self._name = 'HeatMap'
4545
self.tile_name = name if name is not None else self.get_name()
4646

@@ -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

tests/test_folium.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -450,7 +450,7 @@ def test_geo_json_data_binding(self):
450450
[71.285909, -66.979601]], bounds
451451

452452
def test_topo_json(self):
453-
"""Test geojson method."""
453+
"""Test topojson method."""
454454

455455
self.map = folium.Map([43, -100], zoom_start=4)
456456

@@ -467,8 +467,8 @@ def test_topo_json(self):
467467
assert ''.join(topojson_str.split())[:-1] in ''.join(out.split())
468468

469469
bounds = self.map.get_bounds()
470-
assert bounds == [[-124.56617536999985, 41.99187135900012],
471-
[-116.46422312599977, 46.28768217800006]], bounds
470+
assert bounds == [[41.99187135900012, -124.56617536999985],
471+
[46.28768217800006, -116.46422312599977]], bounds
472472

473473
def test_map_build(self):
474474
"""Test map build."""

0 commit comments

Comments
 (0)