Folium: TimeSliderChoropleth is broken

Created on 30 Oct 2019  路  8Comments  路  Source: python-visualization/folium

Running the provided example produces a map with no changing colors/opacity.

bug

Most helpful comment

I've looked into it, the problem lies here.

All 8 comments

Hi @noahbishop,

Can you give a bit more information?

  • What Python version are you using?
  • What version of folium?
  • Do you get any error messages or warnings in Python?
  • Do you see any error messages or warnings in your browser console?

What Python version are you using?

Python 3.7

What version of folium?

0.10.0

Do you get any error messages or warnings in Python?

None

Do you see any error messages or warnings in your browser console?

Uncaught TypeError: Cannot read property 'hasOwnProperty' of undefined
    at i.setStyle (leaflet.js:5)
    at i._setLayerStyle (leaflet.js:5)
    at i.<anonymous> (leaflet.js:5)
    at i.eachLayer (leaflet.js:5)
    at i.setStyle (leaflet.js:5)
    at TimeSliderChoropleth.html:120

The corresponding line in the html file is:

macro_element_e040a831450244af8b8cd9c49e72109f.setStyle(function(feature) {
                feature.properties.style;
            });

Thanks, that's helpful. Someone (possibly me) will have to look into this.

I've looked into it, the problem lies here.

I also see the exact same error.

Python 3.6.5
Folium 0.10.0

Errors are the same as noahbishop.

@noahbishop thanks for looking into this! That's a weird piece of code, it doesn't do anything as is. Do you want to open a PR with your fix?

https://github.com/python-visualization/folium/pull/1227 which fixes this issue has been merged.

@noahbishop thanks for investigating this issue. @khllkcm thanks for making the PR. This change is now available in the v0.10.1. release that was made available just now.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

FlorianHoevelmann picture FlorianHoevelmann  路  14Comments

EMarcantonio picture EMarcantonio  路  41Comments

reaganch picture reaganch  路  13Comments

agravier picture agravier  路  26Comments

Alcampopiano picture Alcampopiano  路  14Comments