Skip to content

Vector path options don't accept camelCase #1452

@nwpulver

Description

@nwpulver

Describe the bug
According to documentation, fill opacity is controlled by leaflet kwargs; at least for 'folium.Circle'. The link to the leaflet page suggests the correct arg to change opacity is 'fillOpcatiy'. Using 'fillOpacity' does not throw any error, but it also does not do anything. After searching around online I found someones code snippet where they use 'fill_opacity' instead and that works fine.

To Reproduce

m = folium.Map()
folium.Circle(
            location=(34.05,-118) ,
            radius=1,
            fill=True,
            color='red',
            weight = 1,
            fillOpacity=.7
            ).add_to(m)

Expected behavior
Change the opacity of the fill in a circle marker.

Environment (please complete the following information):

  • Firefox
  • Jupyter
  • Python version: 3.7.6
  • folium version: 0.11.0
  • branca version: 0.3.1

Possible solutions
Change Documentation to reflect correct usage. I suspect this issue may be repeated elsewhere with other markers and other options that are not 'fill_opacity'.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugAn issue describing unexpected or malicious behaviour

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions