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.
Visualization Library
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:
<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 the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-02-07 UTC.
[null,null,["Last updated 2025-02-07 UTC."],[[["The Maps JavaScript API offers a `visualization` library with a `HeatmapLayer` class for visualizing data intensity at geographical points."],["You can find a practical example of using the `HeatmapLayer` in the earthquake mapping tutorial, which demonstrates plotting earthquake locations and intensity."],["To utilize the `visualization` library's functionalities, load it separately using the `libraries` parameter in the Maps JavaScript API bootstrap URL, specifying `visualization` as the desired library."]]],[]]