Security notice: We have become aware of a security issue that may be affecting websites using specific third-party libraries (including polyfill.io). This issue can sometimes redirect visitors away from the intended website without website owner knowledge or permission. Many of our JavaScript samples previously included a polyfill.io script declaration. We have removed this from our samples. If you have used our JavaScript samples that contain this declaration, we recommend removing the declaration.
Announcement: New basemap styling is coming soon to Google Maps Platform. This update to map styling includes a new default color palette, modernized pins, and improvements to map experiences and usability. All map styles will be automatically updated in March 2025. For more information on availability and how to opt in earlier, see New map style for Google Maps Platform.
Stay organized with collections
Save and categorize content based on your preferences.
Overview
The Maps JavaScript API uses libraries to provide supplemental
features. The visualization library includes the
HeatmapLayer class, which you can use to visualize data
intensity at geographical points.
For example, the earthquake mapping tutorial uses the HeatMapLayer
class to plot earthquake locations and intensity, and walks you step by step
through the code.
Using the library
The visualization library is a self-contained library, separate from the main
Maps JavaScript API code. To use the functionality contained
within this library, you must first load it using the libraries parameter in
the Maps JavaScript API bootstrap URL: