Configuring heatmap overlays using Google Maps API

落爺英雄遲暮 提交于 2019-12-03 16:40:35

Check out maxIntensity. I had a similar issue. maxIntensity combined with radius fixed it.

maxIntensity: The maximum intensity of the heatmap. By default, heatmap colors are dynamically scaled according to the greatest concentration of points at any particular pixel on the map. This property allows you to specify a fixed maximum. Setting the maximum intensity can be helpful when your dataset contains a few outliers with an unusually high intensity.

The heatmap works great for some datasets, and not so well for others. You might be interested in starring one or both of the following feature requests:

http://code.google.com/p/fusion-tables/issues/detail?id=85

http://code.google.com/p/fusion-tables/issues/detail?id=68

If you use the Google Maps Javascript API v3 (as opposed to the Fusion Tables API you are currently using) you can set the 'radius' property of your heatmap object to do exactly what you're attempting to do.

Unfortunately, there is no way to do this using the Fusion Tables API. The documentation even mentions this explicitly:

Fusion Table Layer: No ability to customize the appearance of the heatmap.

Yes there is.

Check out the code I'm using:

heatmap = new google.maps.visualization.HeatmapLayer({
    dissipating: true,
    map: map,
    radius: 50
});

The radius is measured in meters, so my blobs will be 100 meters in diameter. Let me know if this helps you.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!