@@ -438,7 +438,12 @@ def add_plugin(self, plugin):
438
438
#
439
439
# self.template_vars.update({'fit_bounds': fit_bounds_str.strip()})
440
440
441
- def geo_json (self , geo_path = None , geo_str = None , data_out = 'data.json' ,
441
+ def geo_json (self , ** kwargs ):
442
+ """This method is deprecated, see `Map.choropleth` instead."""
443
+ warnings .warn ('This method is deprecated. Please use Map.choropleth instead.' )
444
+ return self .choropleth (** kwargs )
445
+
446
+ def choropleth (self , geo_path = None , geo_str = None , data_out = 'data.json' ,
442
447
data = None , columns = None , key_on = None , threshold_scale = None ,
443
448
fill_color = 'blue' , fill_opacity = 0.6 , line_color = 'black' ,
444
449
line_weight = 1 , line_opacity = 1 , legend_name = None ,
@@ -604,15 +609,9 @@ def geo_json(self, geo_path=None, geo_str=None, data_out='data.json',
604
609
else :
605
610
geo_json = GeoJson (geo_data , style_function = style_function )
606
611
607
- # Create GeoJsonStyle.
608
- #geo_json_style = GeoJsonStyle(
609
- # color_domain, fill_color, color_data=color_data, key_on=key_on,
610
- # weight=line_weight, opacity=line_opacity, color=line_color,
611
- # fill_opacity=fill_opacity)
612
-
613
- #geo_json.add_children(geo_json_style)
614
612
self .add_children (geo_json )
615
- # Create ColorScale
613
+
614
+ # Create ColorScale.
616
615
if color_domain :
617
616
color_scale = ColorScale (color_domain , fill_color , caption = legend_name )
618
617
self .add_children (color_scale )
0 commit comments