Mudar o raio para um único ponto no mapa de calor?

Aqui está como você cria a camada Heatmap na Api do Google Maps:

var data = [
        {location: new google.maps.LatLng(59.4072, 24.7053),weight:0.8},
        {location: new google.maps.LatLng(59.4372, 24.7473),weight: 1},
        {location: new google.maps.LatLng(59.4372, 24.7493),weight:0.8},
        {location: new google.maps.LatLng(59.483428, 24.841709),weight: 0.6},
        {location: new google.maps.LatLng(59.483256, 24.846666),weight: 0.2},
        {location: new google.maps.LatLng(59.409425, 27.278345),weight: 0.3}
    ];

heatmap = new google.maps.visualization.HeatmapLayer({
    data: data,
    radius: 10
});

Como pode ver, tem de indicar o raio na configuração Heatmap.
mas como posso especificar um raio diferente para uma única fonte (ponto) no mapa de calor?

Author: Michael, 2015-05-08

1 answers

Em teoria, pode-se fazer várias camadas de imagem de calor. https://github.com/pa7/heatmap.js/issues/96#issuecomment-272202758
var data1 = [
    {location: new google.maps.LatLng(59.4072, 24.7053),weight:0.8},
    {location: new google.maps.LatLng(59.4372, 24.7473),weight: 1},
    {location: new google.maps.LatLng(59.4372, 24.7493),weight:0.8},
    {location: new google.maps.LatLng(59.483428, 24.841709),weight: 0.6},
    {location: new google.maps.LatLng(59.483256, 24.846666),weight: 0.2},
    {location: new google.maps.LatLng(59.409425, 27.278345),weight: 0.3}
];

Heatmap1 = novo google.mapa.visualizacao.( dados: data1, raio: 10 });

var data2 = [
    {location: new google.maps.LatLng(59.4072, 24.7053),weight:0.8},
    {location: new google.maps.LatLng(59.4372, 24.7473),weight: 1},
    {location: new google.maps.LatLng(59.4372, 24.7493),weight:0.8},
    {location: new google.maps.LatLng(59.483428, 24.841709),weight: 0.6},
    {location: new google.maps.LatLng(59.483256, 24.846666),weight: 0.2},
    {location: new google.maps.LatLng(59.409425, 27.278345),weight: 0.3}
];
Heatmap2 = novo google.mapa.visualizacao.( dados: data2, raio: 3 });
 0
Author: Tim Morford, 2018-06-11 12:12:57