5
5
import copy
6
6
import asyncio
7
7
import json
8
- from folium import LinearColormap
9
8
import xyzservices
10
9
from datetime import date , timedelta
11
10
from math import isnan
12
- from branca .colormap import linear , ColorMap
11
+ from branca .colormap import linear , LinearColormap , ColorMap
13
12
from IPython .display import display
14
13
import warnings
15
14
@@ -800,8 +799,16 @@ class Heatmap(RasterLayer):
800
799
Radius of the data points.
801
800
blur: float, default 15.
802
801
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
804
809
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.
805
812
"""
806
813
807
814
_view_name = Unicode ('LeafletHeatmapView' ).tag (sync = True )
@@ -823,8 +830,7 @@ class Heatmap(RasterLayer):
823
830
vmin = values [0 ]
824
831
vmax = values [len (values )- 1 ]
825
832
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 )
828
834
829
835
830
836
class VectorTileLayer (Layer ):
0 commit comments