Pass the coordinates data in heatmap props and don't forget to set heatmapLibrary props true.
The LIST_OF_POINTS passed to positions[in heatmap prop] is an array of coordinates. Export coordinates array by creating a new file HeatmapPoints.js. HeatmapPoints.js
export const LIST_OF_POINTS = [
{
lat: 9.9256235,
lng: 78.1177802,
},
{
lat: 9.920991599999999,
lng: 78.1118825,
},
{
lat: 9.9206833,
lng: 78.1123521,
},
//Add as many coordinates you want.
]
Note
Make sure the container element of Heatmaps components has width and height. The map will fill the parent container, but if the container has no size, it will be collapsed.