@@ -837,8 +837,7 @@ def add_opacity_control(
837837 """
838838
839839 class _OpacityControl (JSCSSMixin , Layer ):
840- _template = Template (
841- """
840+ _template = Template ("""
842841 {% macro head(this, kwargs) %}
843842 <style>
844843 .leaflet-control.leafmap-opacity-control {
@@ -1022,8 +1021,7 @@ class _OpacityControl(JSCSSMixin, Layer):
10221021 }
10231022 })();
10241023 {% endmacro %}
1025- """
1026- )
1024+ """ )
10271025
10281026 def __init__ (
10291027 self ,
@@ -2436,15 +2434,11 @@ def add_title(
24362434 if style is None :
24372435 title_html = """
24382436 <h3 align={} style="font-size:{}"><b>{}</b></h3>
2439- """ .format (
2440- align , font_size , title
2441- )
2437+ """ .format (align , font_size , title )
24422438 else :
24432439 title_html = """
24442440 <h3 align={} style={}><b>{}</b></h3>
2445- """ .format (
2446- align , style , title
2447- )
2441+ """ .format (align , style , title )
24482442 self .get_root ().html .add_child (folium .Element (title_html ))
24492443
24502444 def static_map (
@@ -3990,15 +3984,13 @@ class SplitControl(Layer):
39903984 >>> sidebyside.add_to(m)
39913985 """
39923986
3993- _template = Template (
3994- """
3987+ _template = Template ("""
39953988 {% macro script(this, kwargs) %}
39963989 var {{ this.get_name() }} = L.control.sideBySide(
39973990 {{ this.layer_left.get_name() }}, {{ this.layer_right.get_name() }}
39983991 ).addTo({{ this._parent.get_name() }});
39993992 {% endmacro %}
4000- """
4001- )
3993+ """ )
40023994
40033995 def __init__ (
40043996 self , layer_left , layer_right , name = None , overlay = True , control = True , show = True
@@ -4046,15 +4038,13 @@ class SideBySideLayers(JSCSSMixin, Layer):
40464038 >>> sidebyside.add_to(m)
40474039 """
40484040
4049- _template = Template (
4050- """
4041+ _template = Template ("""
40514042 {% macro script(this, kwargs) %}
40524043 var {{ this.get_name() }} = L.control.sideBySide(
40534044 {{ this.layer_left.get_name() }}, {{ this.layer_right.get_name() }}
40544045 ).addTo({{ this._parent.get_name() }});
40554046 {% endmacro %}
4056- """
4057- )
4047+ """ )
40584048
40594049 default_js = [
40604050 (
@@ -4076,8 +4066,7 @@ class CustomControl(MacroElement):
40764066
40774067 """
40784068
4079- _template = Template (
4080- """
4069+ _template = Template ("""
40814070 {% macro script(this, kwargs) %}
40824071 L.Control.CustomControl = L.Control.extend({
40834072 onAdd: function(map) {
@@ -4096,8 +4085,7 @@ class CustomControl(MacroElement):
40964085 { position: "{{ this.position }}" }
40974086 ).addTo({{ this._parent.get_name() }});
40984087 {% endmacro %}
4099- """
4100- )
4088+ """ )
41014089
41024090 def __init__ (self , html , position = "bottomleft" ):
41034091 def escape_backticks (text ):
@@ -4114,8 +4102,7 @@ def escape_backticks(text):
41144102class FloatText (MacroElement ):
41154103 """Adds a floating image in HTML canvas on top of the map."""
41164104
4117- _template = Template (
4118- """
4105+ _template = Template ("""
41194106 {% macro header(this,kwargs) %}
41204107 <style>
41214108 #{{this.get_name()}} {
@@ -4153,8 +4140,7 @@ class FloatText(MacroElement):
41534140 }
41544141 </style>
41554142 {% endmacro %}
4156- """
4157- )
4143+ """ )
41584144
41594145 def __init__ (self , text , bottom = 75 , left = 75 ):
41604146 super (FloatText , self ).__init__ ()
@@ -4347,8 +4333,7 @@ def random_color(feature):
43474333class GeoTIFFLayer (JSCSSMixin , Layer ):
43484334 """Leaflet layer that renders Cloud Optimized GeoTIFFs client-side."""
43494335
4350- _template = Template (
4351- """
4336+ _template = Template ("""
43524337 {% macro script(this, kwargs) %}
43534338 var {{ this.get_name() }} = L.layerGroup();
43544339 {% if this.control %}
@@ -4540,8 +4525,7 @@ class GeoTIFFLayer(JSCSSMixin, Layer):
45404525 }
45414526 })();
45424527 {% endmacro %}
4543- """
4544- )
4528+ """ )
45454529
45464530 default_js = [
45474531 ("proj4" , "https://cdn.jsdelivr.net/npm/proj4@2.8.1/dist/proj4.js" ),
@@ -4621,8 +4605,7 @@ class PMTilesLayer(JSCSSMixin, Layer):
46214605 Adapted from https://github.com/jtmiclat/folium-pmtiles. Credits to @jtmiclat.
46224606 """
46234607
4624- _template = Template (
4625- """
4608+ _template = Template ("""
46264609 {% macro script(this, kwargs) -%}
46274610 var protocol = new pmtiles.Protocol();
46284611 maplibregl.addProtocol("pmtiles", protocol.tile);
@@ -4639,8 +4622,7 @@ class PMTilesLayer(JSCSSMixin, Layer):
46394622 }).addTo({{ this._parent.get_name() }});
46404623
46414624 {%- endmacro %}
4642- """
4643- )
4625+ """ )
46444626 default_css = [
46454627 ("maplibre_css" , "https://unpkg.com/maplibre-gl@2.4.0/dist/maplibre-gl.css" )
46464628 ]
@@ -4705,8 +4687,7 @@ class PMTilesMapLibreTooltip(JSCSSMixin, MacroElement):
47054687 Adapted from https://github.com/jtmiclat/folium-pmtiles. Credits to @jtmiclat.
47064688 """
47074689
4708- _template = Template (
4709- """
4690+ _template = Template ("""
47104691 {% macro header(this, kwargs) %}
47114692 <style>
47124693 .maplibregl-popup {
@@ -4773,8 +4754,7 @@ class PMTilesMapLibreTooltip(JSCSSMixin, MacroElement):
47734754 setTooltipForPMTilesMapLibreLayer_{{ this.get_name() }}({{ this._parent.get_name() }});
47744755 });
47754756 {%- endmacro %}
4776- """
4777- )
4757+ """ )
47784758
47794759 def __init__ (self , name = None , ** kwargs ):
47804760 # super().__init__(name=name if name else "PMTilesTooltip", **kwargs)
0 commit comments