this.http.get('assets/letting.json').subscribe(data => {
this.lettings = data['data'];
const heatmapData = [];
this.lettings.map(x => {
heatmapData.push({
location: new maps.LatLng(x[24], x[23]),
weight: parseInt(x[15], 10)
});
});
const heatmap = new maps.visualization.HeatmapLayer({
data: heatmapData
});
heatmap.set('gradient', customGradient);
heatmap.set('radius', 70);
heatmap.set('opacity', 1);
heatmap.setMap(this.map);
});