Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions src/HeatLayer.js
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ L.HeatLayer = (L.Layer ? L.Layer : L.Class).extend({

max = this.options.max === undefined ? 1 : this.options.max,
maxZoom = this.options.maxZoom === undefined ? this._map.getMaxZoom() : this.options.maxZoom,
v = 1 / Math.pow(2, Math.max(0, Math.min(maxZoom - this._map.getZoom(), 12))),
v = 1, // vestigial
cellSize = r / 2,
grid = [],
panePos = this._map._getMapPanePos(),
Expand Down Expand Up @@ -157,7 +157,8 @@ L.HeatLayer = (L.Layer ? L.Layer : L.Class).extend({
} else {
cell[0] = (cell[0] * cell[2] + p.x * k) / (cell[2] + k); // x
cell[1] = (cell[1] * cell[2] + p.y * k) / (cell[2] + k); // y
cell[2] += k; // cumulated intensity value
// Join multiple cell values using alpha blending
cell[2] = (cell[2] * (1 - k/max)) + k;
}
}
}
Expand Down