55import copy
66import asyncio
77import json
8- from folium import LinearColormap
98import xyzservices
109from datetime import date , timedelta
1110from math import isnan
12- from branca .colormap import linear , ColorMap
11+ from branca .colormap import linear , LinearColormap , ColorMap
1312from IPython .display import display
1413import warnings
1514
@@ -800,8 +799,16 @@ class Heatmap(RasterLayer):
800799 Radius of the data points.
801800 blur: float, default 15.
802801 Blurring intensity.
803- gradient: dict, default {0.4: 'blue', 0.6: 'cyan', 0.7: 'lime', 0.8: 'yellow', 1.0: 'red'}
802+ values : list, default [0.4, 0.6, 0.7, 0.8, 1.0]
803+ list of values to define the gradient
804+ colors : list, default ['blue', 'cyan', 'lime', 'yellow', 'red']
805+ list of colors to define the gradient
806+ dict: dict, default built from values (keys) and colors lists (values)
807+ dictionnary mapping value to colors.
808+ gradient : Dict, default built from dict
804809 Colors used for the color-mapping from low to high heatmap intensity.
810+ colormap: branca.colormap.LinearColorMap instance
811+ The colormap used for displaying the HeatMap data, defined with the same min and max values and colors than the gradient.
805812 """
806813
807814 _view_name = Unicode ('LeafletHeatmapView' ).tag (sync = True )
@@ -823,8 +830,7 @@ class Heatmap(RasterLayer):
823830 vmin = values [0 ]
824831 vmax = values [len (values )- 1 ]
825832 gradient = Dict (dict ).tag (sync = True , o = True )
826- colormap = LinearColormap ([colors ], vmin = vmin , vmax = vmax )
827-
833+ colormap = LinearColormap (colors , vmin = vmin , vmax = vmax )
828834
829835
830836class VectorTileLayer (Layer ):
0 commit comments