Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/468.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript 谷歌地图热图的单独半径_Javascript_Google Maps_Google Maps Api 3_Heatmap - Fatal编程技术网

Javascript 谷歌地图热图的单独半径

Javascript 谷歌地图热图的单独半径,javascript,google-maps,google-maps-api-3,heatmap,Javascript,Google Maps,Google Maps Api 3,Heatmap,我正在使用GoogleMapsJavaScriptV3API,我正在尝试使用这个api热图层制作一个热图应用程序。 在我的应用程序中,我需要每个位置(加权lanlng位置)都有自己的半径。正如我在文档中看到的,为整个层设置了半径属性(热图层中所有位置的半径相同)。拥有多个热图层不是一个好的解决方案,因为它会使应用程序速度过慢。有什么想法吗 谢谢, 你可以制作多个热图图层。 ]) ]) var data1 = [ {location: new google.maps.LatLng(59.4072

我正在使用GoogleMapsJavaScriptV3API,我正在尝试使用这个api热图层制作一个热图应用程序。 在我的应用程序中,我需要每个位置(加权lanlng位置)都有自己的半径。正如我在文档中看到的,为整个层设置了半径属性(热图层中所有位置的半径相同)。拥有多个热图层不是一个好的解决方案,因为它会使应用程序速度过慢。有什么想法吗

谢谢,
你可以制作多个热图图层。

])

])

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 = new google.maps.visualization.HeatmapLayer1({ data: data1, radius: 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 = new google.maps.visualization.HeatmapLayer2({ data: data2, radius: 3 });