Component API

March 31, 2023 ยท View on GitHub

Note: Supported on Google Maps only.

Props

PropTypeDefaultNote
pointsArray<WeightedLatLng>Array of heatmap entries to apply towards density.
radiusNumber20The radius of the heatmap points in pixels, between 10 and 50.
opacityNumber0.7The opacity of the heatmap.
gradientObjectHeatmap gradient configuration (See below for Gradient Config).

Gradient Config

Android Doc | iOS Doc

PropTypeDefaultNote
colorsArray<String>Colors (one or more) to use for gradient.
startPointsArray<Number>Array of floating point values from 0 to 1 representing where each color starts. Array length must be equal to colors array length.
colorMapSizeNumber256Resolution of color map -- number corresponding to the number of steps colors are interpolated into.

Types

type WeightedLatLng = {
  latitude: Number;
  longitude: Number;
  weight?: Number;
}