function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
BB 

Heatmap coloring is not working

I'm trying to display a heatmap on the leaflet map but the coloring is not working. Here is the llibrary that i use  and the code 

I use this for heatmap https://github.com/Leaflet/Leaflet.heat

var map = L.map('map', {zoomControl: true, tap: false, preferCanvas:true})
var baseLayer = { };

var locationsAccounts = new Array(accounts.length);

var heatmapLayer = L.heatLayer([0,0],{ radius: 20,
blur: 15,
maxZoom: 10,
max: 1.0,
gradient: {
          0.0: 'green',
          0.5: 'yellow',
           1.0: 'red'
         }
});
var overlays = { "Heatmap": heatmapLayer };

L.control.layers(baseLayer, overlays).addTo(map);

for (var i=0, len = accounts.length; i<len; i++) {
locationsAccounts[i]=[accounts[i].Latitude, accounts[i].Longitude,0.5]; }
heatmapLayer.setLatLngs(locationsAccounts);
Best Answer chosen by B
BB
Issue from chrome that i could not resolve it