diff --git a/projects/project-3/frontend/src/app/service/map.service.ts b/projects/project-3/frontend/src/app/service/map.service.ts index 29d5f64..b1509af 100644 --- a/projects/project-3/frontend/src/app/service/map.service.ts +++ b/projects/project-3/frontend/src/app/service/map.service.ts @@ -74,17 +74,41 @@ export class MapService { } public drawHeatmap(): void { + // PLS LOOK AT THIS - START const heatPoints = this.bikePoints.map(bikePoint => ({ lat: bikePoint.lat, lon: bikePoint.lon, intensity: this.getIntensity(bikePoint.status) })); - const heatLayer = L.heatLayer(heatPoints, { - max: 1.0, - minOpacity: 0.2, - radius: 100 + + this.mapOverlays.Heatmap = L.heatLayer(heatPoints, { + max: 0.3, + radius: 90 }); - this.mapOverlays.Heatmap = heatLayer; + + const heatPointsBla = this.bikePoints.map(bikePoint => ([ + bikePoint.lat, + bikePoint.lon, + this.getIntensity(bikePoint.status) + ])); + + this.mapOverlays.Heatmap2 = L.heatLayer(heatPointsBla, { + max: 0.3, + radius: 90 + }); + + const heatPointsBla2 = this.bikePoints.map(bikePoint => ([ + bikePoint.lat, + bikePoint.lon, + bikePoint.status.NbBikes + ])); + + this.mapOverlays.Heatmap3 = L.heatLayer(heatPointsBla2, { + max: 5, + radius: 90 + }); + // PLS LOOK AT THIS - END + L.control.layers(null, this.mapOverlays).addTo(this.map); }