Closed hansthen closed 1 week ago
@Conengmo Perhaps you can also have a look at the raster_layers.WmsTileLayer
class. I still use {{ this.options|tojson }}
there because there is an option that should remain lowercase. The inconsistency bugs me (a bit). I could not think of a way to make it consistent. But perhaps you have suggestions on how we could use tojavascript
here?
Yes, I noticed that one as well. Can't think of a good, simple solution right now, so maybe what you did is best for now.
Boring but big. The leaflet class hierarchy allows all classes to have optional arguments. These optional arguments can contain JavaScript code or references to other Leaflet elements.
To support this in Folium I replaced (almost) all instances of
parse_options
in the constructors withthis.options | tojavascript
in the templates. I left theparse_options
in case someone outside of Folium uses it.