@@ -226,14 +226,14 @@ def add_tile_layer(self, tile_name=None, tile_url=None, **kw):
226
226
227
227
"""
228
228
# Same defaults.
229
- tms = kw .pop ('tms' , 'false' )
229
+ tms = kw .pop ('tms' , False )
230
230
minZoom = kw .pop ('minZoom' , 0 )
231
231
opacity = kw .pop ('opacity' , 1 )
232
232
maxZoom = kw .pop ('maxZoom' , 18 )
233
- noWrap = kw .pop ('noWrap' , 'false' )
233
+ noWrap = kw .pop ('noWrap' , False )
234
234
zoomOffset = kw .pop ('zoomOffset' , 0 )
235
- zoomReverse = kw .pop ('zoomReverse' , 'false' )
236
- continuousWorld = kw .pop ('continuousWorld' , 'false' )
235
+ zoomReverse = kw .pop ('zoomReverse' , False )
236
+ continuousWorld = kw .pop ('continuousWorld' , False )
237
237
238
238
if tile_name not in self .added_layers :
239
239
tile_name = tile_name .replace (" " , "_" )
@@ -824,9 +824,9 @@ def geo_json(self, geo_path=None, geo_str=None, data_out='data.json',
824
824
keyword argument will enable conversion to GeoJSON.
825
825
reset: boolean, default False
826
826
Remove all current geoJSON layers, start with new layer
827
- freescale: if True use free format for the scale, where min and max values
828
- are taken from the data. It also allow to plot allow to plot values < 0
829
- and float legend labels.
827
+ freescale: if True use free format for the scale, where min and max
828
+ values are taken from the data. It also allow to plot
829
+ values < 0 and float legend labels.
830
830
831
831
Output
832
832
------
@@ -915,7 +915,7 @@ def json_style(style_cnt, line_color, line_weight, line_opacity,
915
915
916
916
# D3 Color scale.
917
917
series = data [columns [1 ]]
918
- if freescale == False :
918
+ if not freescale :
919
919
if threshold_scale and len (threshold_scale ) > 6 :
920
920
raise ValueError
921
921
domain = threshold_scale or utilities .split_six (series = series )
@@ -940,18 +940,15 @@ def json_style(style_cnt, line_color, line_weight, line_opacity,
940
940
941
941
if not freescale :
942
942
legend = leg_templ .render ({'lin_min' : 0 ,
943
- 'lin_max' : int (domain [- 1 ]* 1.1 ),
944
- 'tick_labels' : tick_labels ,
945
- 'caption' : name })
946
-
947
-
943
+ 'lin_max' : int (domain [- 1 ]* 1.1 ),
944
+ 'tick_labels' : tick_labels ,
945
+ 'caption' : name })
948
946
else :
949
947
legend = leg_templ .render ({'lin_min' : domain [0 ],
950
948
'lin_max' : domain [- 1 ],
951
949
'tick_labels' : tick_labels ,
952
950
'caption' : name })
953
951
954
-
955
952
self .template_vars .setdefault ('map_legends' , []).append (legend )
956
953
957
954
# Style with color brewer colors.
0 commit comments