HeatmapLayer class
google.maps.visualization.HeatmapLayer
class
A layer that provides a client-side rendered heatmap, depicting the intensity of data at geographical points.
This class extends
MVCObject
.
Library
visualization
Constructor | |
---|---|
HeatmapLayer |
HeatmapLayer([opts]) Parameters:
Creates a new instance of HeatmapLayer . |
Methods | |
---|---|
getData |
getData() Parameters: None
Return Value:
MVCArray<LatLng|WeightedLocation> Returns the data points currently displayed by this heatmap. |
getMap |
getMap() Parameters: None
Return Value:
Map |
setData |
setData(data) Parameters:
Return Value: None
Sets the data points to be displayed by this heatmap. |
setMap |
setMap(map) Parameters:
Return Value: None
Renders the heatmap on the specified map. If map is set to null, the heatmap will be removed. |
setOptions |
setOptions(options) Parameters:
Return Value: None
|
HeatmapLayerOptions interface
google.maps.visualization.HeatmapLayerOptions
interface
This object defines the properties that can be set on a HeatmapLayer
object.
Library
visualization
Properties | |
---|---|
data |
Type:
MVCArray<LatLng|WeightedLocation>|Array<LatLng|WeightedLocation> optional The data points to display. Required. |
dissipating |
Type:
boolean optional Specifies whether heatmaps dissipate on zoom. By default, the radius of influence of a data point is specified by the radius option only. When dissipating is disabled, the radius option is interpreted as a radius at zoom level 0. |
gradient |
Type:
Array<string> optional The color gradient of the heatmap, specified as an array of CSS color strings. All CSS3 colors are supported except for extended named colors. |
map |
Type:
Map optional The map on which to display the layer. |
maxIntensity |
Type:
number optional 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. |
opacity |
Type:
number optional The opacity of the heatmap, expressed as a number between 0 and 1. Defaults to 0.6. |
radius |
Type:
number optional The radius of influence for each data point, in pixels. |
WeightedLocation interface
google.maps.visualization.WeightedLocation
interface
A data point entry for a heatmap. This is a geographical data point with a weight attribute.
Library
visualization
Properties | |
---|---|
location |
Type:
LatLng The location of the data point. |
weight |
Type:
number The weighting value of the data point. |