From 8a08d1b5e248fd917a42ed1ec8b22a0fe2791b9e Mon Sep 17 00:00:00 2001 From: Robin Tuszik Date: Sat, 13 Dec 2025 14:20:22 +0100 Subject: [PATCH] fix: use constant weight for maplibre heatmap layer --- app/javascript/maps_maplibre/layers/heatmap_layer.js | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/app/javascript/maps_maplibre/layers/heatmap_layer.js b/app/javascript/maps_maplibre/layers/heatmap_layer.js index 3802e497..a1a53ddb 100644 --- a/app/javascript/maps_maplibre/layers/heatmap_layer.js +++ b/app/javascript/maps_maplibre/layers/heatmap_layer.js @@ -9,7 +9,6 @@ export class HeatmapLayer extends BaseLayer { constructor(map, options = {}) { super(map, { id: 'heatmap', ...options }) this.radius = 20 // Fixed radius - this.weight = options.weight || 1 this.intensity = 1 // Fixed intensity this.opacity = options.opacity || 0.6 } @@ -31,14 +30,8 @@ export class HeatmapLayer extends BaseLayer { type: 'heatmap', source: this.sourceId, paint: { - // Increase weight as diameter increases - 'heatmap-weight': [ - 'interpolate', - ['linear'], - ['get', 'weight'], - 0, 0, - 6, 1 - ], + // Fixed weight for each point + 'heatmap-weight': 1, // Increase intensity as zoom increases 'heatmap-intensity': [