Heatmap#

Example#

from ipyleaflet import Map, Heatmap
from random import uniform
m = Map(center=(0, 0), zoom=2)

heatmap = Heatmap(
    locations=[[uniform(-80, 80), uniform(-180, 180), uniform(0, 1000)] for i in range(1000)],
    radius=20
)

m.add(heatmap);

m

Attributes#

class ipyleaflet.leaflet.Heatmap(**kwargs: Any)[source]#

Heatmap class, with RasterLayer as parent class.

Heatmap layer.

locations#

List of data points locations for generating the heatmap.

Type:

list, default []

radius#

Radius of the data points.

Type:

float, default 25.

blur#

Blurring intensity.

Type:

float, default 15.

gradient#

Colors used for the color-mapping from low to high heatmap intensity.

Type:

dict, default {0.4: ‘blue’, 0.6: ‘cyan’, 0.7: ‘lime’, 0.8: ‘yellow’, 1.0: ‘red’}