Visualization Library Stay organized with collections Save and categorize content based on your preferences.
AI-generated Key Takeaways
The Maps JavaScript API offers a
visualizationlibrary with aHeatmapLayerclass for visualizing data intensity at geographical points.You can find a practical example of using the
HeatmapLayerin the earthquake mapping tutorial, which demonstrates plotting earthquake locations and intensity.To utilize the
visualizationlibrary's functionalities, load it separately using thelibrariesparameter in the Maps JavaScript API bootstrap URL, specifyingvisualizationas the desired library.
Deprecated: The Heatmap Layer functionality in the Maps JavaScript API will no longer be supported. This API was deprecated in May 2025 and will be made unavailable in a later version of the Maps JavaScript API, releasing in May 2026. As a replacement for the Heatmap Layer, consider using third-party library integrations like deck.gl, which offers a HeatmapLayer implementation. You can find more information in thedeck.gl documentation.
Overview
The Maps JavaScript API uses libraries to provide supplementalfeatures. Thevisualization library includes theHeatmapLayer class, which you can use to visualize dataintensity at geographical points.
For example, theearthquake mapping tutorial uses theHeatMapLayerclass to plot earthquake locations and intensity, and walks you step by stepthrough the code.
Use the library
The visualization library is a self-contained library, separate from the mainMaps JavaScript API code. To use the functionality containedwithin this library, you must first load it using thelibraries parameter inthe Maps JavaScript API bootstrap URL:
<script async src="https://maps.googleapis.com/maps/api/js?key=YOUR_API_KEY&loading=async&libraries=visualization&callback=initMap"></script>Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-11-21 UTC.