Я хочу поставить три точки в Google Map с lat long , но я хочу, чтобы каждая точка была разного цвета.
Это мой код, на данный момент этот код устанавливает один цвет для всех точек
function initMap() {
map = new google.maps.Map(document.getElementById('map'), {
zoom: 11,
center: {lat: 39.585938, lng: 47.909219}
});
heatmap = new google.maps.visualization.HeatmapLayer({
data: getPoints(),
map: map
});
var gradient = [
'rgba(255, 0, 0, 0)',
'rgba(255, 0, 0, 1)'
]
heatmap.set('gradient', gradient);
}
function getPoints() {
return [
new google.maps.LatLng(39.585938, 47.909219,20),
new google.maps.LatLng(39.585938, 47.909220,20),
new google.maps.LatLng(39.585938, 47.909221,20),
new google.maps.LatLng(39.585938, 47.909222,20),
];
}