1818class WmsTileLayer (TileLayer ):
1919 def __init__ (self , url , name = None ,
2020 format = None , layers = None , transparent = True ,
21- attribution = None ):
21+ attr = None ):
2222 """
2323 TODO docstring here
2424
@@ -30,10 +30,7 @@ def __init__(self, url, name=None,
3030 self .format = format
3131 self .layers = layers
3232 self .transparent = transparent
33- # if attribution is None:
34- # raise ValueError('WMS must'
35- # ' also be passed an attribution')
36- self .attribution = attribution
33+ self .attr = attr
3734
3835 self ._template = Template (u"""
3936 {% macro script(this, kwargs) %}
@@ -43,7 +40,7 @@ def __init__(self, url, name=None,
4340 format:'{{ this.format }}',
4441 transparent: {{ this.transparent.__str__().lower() }},
4542 layers:'{{ this.layers }}'
46- {% if this.attribution %}, attribution:'{{this.attribution }}'{% endif %}
43+ {% if this.attr %}, attribution:'{{this.attr }}'{% endif %}
4744 }
4845 ).addTo({{this._parent.get_name()}});
4946
@@ -619,7 +616,7 @@ def __init__(self, locations, color=None, weight=None,
619616
620617
621618class ImageOverlay (MacroElement ):
622- def __init__ (self , image , bounds , opacity = 1. , attribution = None ,
619+ def __init__ (self , image , bounds , opacity = 1. , attr = None ,
623620 origin = 'upper' , colormap = None , mercator_project = False ):
624621 """
625622 Used to load and display a single image over specific bounds of
@@ -664,7 +661,7 @@ def __init__(self, image, bounds, opacity=1., attribution=None,
664661 self .bounds = json .loads (json .dumps (bounds ))
665662 options = {
666663 'opacity' : opacity ,
667- 'attribution' : attribution ,
664+ 'attribution' : attr ,
668665 }
669666 self .options = json .dumps ({key : val for key , val
670667 in options .items () if val },
0 commit comments