Skip to content

Commit df39286

Browse files
authored
Merge pull request #1240 from Conengmo/host-leaflet-heatmap-ourselves
Host pa7 leaflet-heatmap.js to avoid adblockers
2 parents 61daf0c + fc95a60 commit df39286

File tree

3 files changed

+28
-2
lines changed

3 files changed

+28
-2
lines changed

folium/plugins/heat_map_withtime.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ def render(self, **kwargs):
175175
name='heatmap.min.js')
176176

177177
figure.header.add_child(
178-
JavascriptLink('https://rawcdn.githack.com/pa7/heatmap.js/develop/plugins/leaflet-heatmap/leaflet-heatmap.js'), # noqa
178+
JavascriptLink('https://rawcdn.githack.com/python-visualization/folium/master/folium/templates/pa7_leaflet_hm.min.js'), # noqa
179179
name='leaflet-heatmap.js')
180180

181181
figure.header.add_child(

folium/templates/pa7_leaflet_hm.min.js

Lines changed: 26 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

tests/plugins/test_heat_map_withtime.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ def test_heat_map_with_time():
3030
assert script in out
3131
script = '<script src="https://rawcdn.githack.com/python-visualization/folium/master/folium/templates/pa7_hm.min.js"></script>' # noqa
3232
assert script in out
33-
script = '<script src="https://rawcdn.githack.com/pa7/heatmap.js/develop/plugins/leaflet-heatmap/leaflet-heatmap.js"></script>' # noqa
33+
script = '<script src="https://rawcdn.githack.com/python-visualization/folium/master/folium/templates/pa7_leaflet_hm.min.js"></script>' # noqa
3434
assert script in out
3535
script = '<link rel="stylesheet" href="http://apps.socib.es/Leaflet.TimeDimension/dist/leaflet.timedimension.control.min.css"/>' # noqa
3636
assert script in out

0 commit comments

Comments
 (0)