javascriptgoogle-mapsgoogle-maps-api-3

Google Maps heat map and markers


I'm trying to set up a heat map (which I did) but seems that Google integrates all the markers in one point and if I zoom in it is still showing only one point.

Using heat map:

enter image description here

Using Markers:

enter image description here

as you can see I got all my markers grouped in the center which is cool but that's not what I expected...

Is there any way to avoid "markers grouping"?


Solution

  • You can customize the heatmap with some parameters (documentation). You may want to tweak the dissipating and radius parameters:

    dissipating: Specifies whether heatmaps dissipate on zoom. When dissipating is false the radius of influence increases with zoom level to ensure that the color intensity is preserved at any given geographic location. Defaults to false.

    radius: The radius of influence for each data point, in pixels.