mirror of
https://github.com/Freika/dawarich.git
synced 2026-01-11 09:41:40 -05:00
fix: use constant weight for maplibre heatmap layer
This commit is contained in:
parent
d40b2a1959
commit
8a08d1b5e2
1 changed files with 2 additions and 9 deletions
|
|
@ -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': [
|
||||
|
|
|
|||
Loading…
Reference in a new issue