diff --git a/src/google_heatmap.js b/src/google_heatmap.js index e40d0cb..9805e07 100644 --- a/src/google_heatmap.js +++ b/src/google_heatmap.js @@ -1,9 +1,10 @@ export const generateHeatmap = (instance, { positions }) => new instance.visualization.HeatmapLayer({ data: positions.reduce( - (acc, { lat, lng }) => { + (acc, { lat, lng, weight = 1 }) => { acc.push({ location: new instance.LatLng(lat, lng), + weight, }); return acc; },