folium: HeatMapWithTime can not work
Please add a code sample or a nbviewer link, copy-pastable if possible
# Your code here
HeatMapWithTime can not work
version python:3.7.4
Problem description
https://nbviewer.jupyter.org/github/python-visualization/folium/blob/master/examples/HeatMapWithTime.ipynb this demo can not work
Expected Output
Output of folium.__version__
‘0.10.0’
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Reactions: 5
- Comments: 18 (6 by maintainers)
Got the same error for HeatMapWithTime. The javascript web link inside the html file are placed by folium leaflet. Looks like there was recent update to leaflet timedimension.
https://rawcdn.githack.com/socib/Leaflet.TimeDimension/master/dist/leaflet.timedimension.min.js Leaflet TimeDimension v1.1.1 - 2019-11-05
Replace with below url in the html to fix the issue. https://cdn.jsdelivr.net/npm/leaflet-timedimension@1.1.0/dist/leaflet.timedimension.min.js
I looked into this a bit. The developer of TimeDimension gave a suggestion in https://github.com/socib/Leaflet.TimeDimension/issues/181, that the iso8601-js-period lib has to be loaded before loading TimeDimension. This is also listed in their basic usage example. Strange enough we were not loading that lib in our heatmap with time plugin. Adding that lib seems to solve this issue. I don’t know why it worked with TimeDimension v1.1.0 without it. But I’d prefer if we can keep up with changes in TimeDimension.
thanks farisnanosoft it works
I have been using the HeatMapWithTime for awhile and it recently failed as well, here the console when loading up the HTML page:
Uncaught ReferenceError: nezasa is not defined at leaflet.timedimension.min.js:18 at leaflet.timedimension.min.js:18 HMwTime.html:41 Uncaught TypeError: Cannot read property ‘Layer’ of undefined at HMwTime.html:41 HMwTime.html:483 Uncaught TypeError: L.timeDimension is not a function at HMwTime.html:483
EDIT: I am also using the workaround to create additional HeatMapWithTime layers done by @Conengmo in https://github.com/python-visualization/folium/issues/1062