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.
Use 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:
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-28 UTC."],[[["\u003cp\u003eThe Maps JavaScript API offers a \u003ccode\u003evisualization\u003c/code\u003e library with a \u003ccode\u003eHeatmapLayer\u003c/code\u003e class for visualizing data intensity at geographical points.\u003c/p\u003e\n"],["\u003cp\u003eYou can find a practical example of using the \u003ccode\u003eHeatmapLayer\u003c/code\u003e in the earthquake mapping tutorial, which demonstrates plotting earthquake locations and intensity.\u003c/p\u003e\n"],["\u003cp\u003eTo utilize the \u003ccode\u003evisualization\u003c/code\u003e library's functionalities, load it separately using the \u003ccode\u003elibraries\u003c/code\u003e parameter in the Maps JavaScript API bootstrap URL, specifying \u003ccode\u003evisualization\u003c/code\u003e as the desired library.\u003c/p\u003e\n"]]],[],null,["# Visualization Library\n\nOverview\n--------\n\nThe Maps JavaScript API uses libraries to provide supplemental\nfeatures. The `visualization` library includes the\n[`HeatmapLayer`](/maps/documentation/javascript/heatmaplayer) class, which you can use to visualize data\nintensity at geographical points.\n\nFor example, the [earthquake mapping tutorial](/maps/documentation/javascript/tutorials/earthquakes) uses the `HeatMapLayer`\nclass to plot earthquake locations and intensity, and walks you step by step\nthrough the code.\n\nUse the library\n---------------\n\nThe visualization library is a self-contained library, separate from the main\nMaps JavaScript API code. To use the functionality contained\nwithin this library, you must first load it using the `libraries` parameter in\nthe Maps JavaScript API bootstrap URL:\n\n\n```html\n\u003cscript async\n src=\"https://maps.googleapis.com/maps/api/js?key=YOUR_API_KEY&loading=async&libraries=visualization&callback=initMap\"\u003e\n\u003c/script\u003e\n```\n\n\u003cbr /\u003e"]]