Leaflet / Leaflet.heat

A tiny, simple and fast heatmap plugin for Leaflet.
http://leaflet.github.io/Leaflet.heat/demo
BSD 2-Clause "Simplified" License
1.55k stars 525 forks source link

max option not working #63

Closed cpunekar closed 8 years ago

cpunekar commented 8 years ago

When I set the max value to 5, I am getting following error in my browser:

Uncaught IndexSizeError: Failed to execute 'addColorStop' on 'CanvasGradient': The provided value (5) is outside the range (0.0, 1.0)

songyanho commented 8 years ago

Please provide your initialisation code so that we can help?

cpunekar commented 8 years ago

var myVar = L.heatLayer(dataPoints, { max: 5.0, radius: 12, blur: 25, maxZoom: 11, gradient: { 0.4: 'blue', 1: 'lime', 5.0: 'red' } });

luispina commented 6 years ago

I'm so sorry to write in a closed thread, but i'm having the same problem. Was there any solution, @cpunekar ?

Thanks in advice for any help.