ヒートマップ
コレクションでコンテンツを整理
必要に応じて、コンテンツの保存と分類を行います。
heatmapTiles
エンドポイントは、タイル オーバーレイを通じて大気質関連のヒートマップを提供します。タイル オーバーレイは、Google マップ上に重ねて表示できる PNG 画像タイルのコレクションです。各画像タイルは 256 x 256 ピクセルです。
ヒートマップ タイルについて
タイル オーバーレイは、タイルのコレクションから組み立てられたグリッドで、各タイルには(X
、Y
)座標が割り当てられています。座標(0,0)のタイルは常にマップの北西隅にあります。X
の値は西から東に増分し、Y
の値は北から南に増分します。
zoom level
は、地図ビューに表示される地図のコンテンツの大きさを決定します。タイルグリッドのサイズは、X
座標と Y
座標をズームレベルで指数関数的にスケーリングすることで決まります。
gridSizeX = XzoomLevel
gridSizeY = YzoomLevel
たとえば、ズームレベル 2 では、世界地図は 4 x 4 の行列で表され、合計 16 個のタイルになります。ズームは、座標に許容される最大値も決定します。
次の図は、ズームレベルが 2 の US_AQI
ヒートマップと、各タイルの座標を示しています。

詳しくは、地図とタイル座標をご覧ください。
ヒートマップ エンドポイントについて
ヒートマップ タイルは、タイルデータを PNG 画像として含むバイト配列で表されます。現在の空気質ヒートマップ タイルをリクエストするには、HTTP GET リクエストを次の URL に送信して heatmapTiles
エンドポイントを使用します。
https://airquality.googleapis.com/v1/mapTypes/TYPE/heatmapTiles/Z/X/Y?key=YOUR_API_KEY
リクエストでは、すべてのリクエスト パラメータが必須です。
TYPE
- 返すヒートマップのタイプ。許容値をご覧ください。
Z
- 地図ビューで地図のコンテンツがどのくらいの大きさで表示されるかを決定するズームレベル。使用できる値は 0 ~ 16 です。値が 0 の場合は、全世界が 1 つのタイルに表示されます。
X
、Y
- 北西の角(0,0)を基準とした、取得するタイルの座標。X
値は西から東に増分し、Y
値は北から南に増分します。
タイル座標は、指定されたズームレベルで有効である必要があります。たとえば、ズームレベルを 2 に設定し、座標 10,10 のタイルをリクエストすると、API はエラーを返します。
YOUR_API_KEY
- アプリケーションの API キー。このキーは、割り当て管理の目的でアプリケーションを識別します。詳細については、鍵を取得するをご覧ください。
ヒートマップ リクエストの例
上の画像は、ズームレベル 2 の US_AQI
ヒートマップと、各タイルの座標を示しています。次の例では、heatmapTiles
エンドポイントを使用して、ヒートマップから座標 0,1 のタイルをリクエストしています。
https://airquality.googleapis.com/v1/mapTypes/US_AQI/heatmapTiles/2/0/1?key=YOUR_API_KEY
タイルは次のように表示されます。

デフォルトの地図の上にタイルをオーバーレイする方法については、地図タイプのオーバーレイをご覧ください。
特に記載のない限り、このページのコンテンツはクリエイティブ・コモンズの表示 4.0 ライセンスにより使用許諾されます。コードサンプルは Apache 2.0 ライセンスにより使用許諾されます。詳しくは、Google Developers サイトのポリシーをご覧ください。Java は Oracle および関連会社の登録商標です。
最終更新日 2025-08-31 UTC。
[null,null,["最終更新日 2025-08-31 UTC。"],[[["\u003cp\u003eThe \u003ccode\u003eheatmapTiles\u003c/code\u003e endpoint delivers air quality heatmaps as a tile overlay, which is a collection of PNG images displayed on top of a Google Map.\u003c/p\u003e\n"],["\u003cp\u003eEach tile within the overlay has specific (X, Y) coordinates, with (0,0) at the northwest corner and increasing values eastward (X) and southward (Y), determined by the zoom level.\u003c/p\u003e\n"],["\u003cp\u003eThe zoom level (0-16) controls the map's scale and the tile grid size, with higher zoom levels showing more detailed areas.\u003c/p\u003e\n"],["\u003cp\u003eTo request a heatmap tile, you need to provide the heatmap type, zoom level (Z), tile coordinates (X, Y), and your API key in the request URL.\u003c/p\u003e\n"],["\u003cp\u003eYou can overlay these heatmap tiles on top of the default map using methods described in the provided documentation for a comprehensive air quality visualization.\u003c/p\u003e\n"]]],[],null,["The\n[`heatmapTiles`](/maps/documentation/air-quality/reference/rest/v1/mapTypes.heatmapTiles/lookupHeatmapTile)\nendpoint provides air quality related heatmaps through a tile overlay. A tile\noverlay is a collection of PNG image tiles that can be displayed on top of a\nGoogle Maps. Each image tile is (256 x 256 pixels).\n\nAbout heatmap tiles\n\nThe tile overlay is a grid assembled from a collection of tiles,\neach assigned (`X`,`Y`) coordinates.\nThe tile with coordinates (0,0) is always at the northwest corner\nof the map. The `X` values increase from west to east,\nwhile the `Y` values increase from north to south.\n\nThe `zoom level` determines how large or small the contents of a map appear in a\nmap view. The tile grid size is determined by scaling the `X` and `Y`\ncoordinates exponentially by the zoom level. \n\n```text\ngridSizeX = XzoomLevel\ngridSizeY = YzoomLevel\n```\n\nFor example, at a zoom level of 2, the world map is represented using a 4 x 4\nmatrix, for a total of 16 tiles. The zoom also determines what is the max value\nallowed for the coordinates.\n\nThe following image shows a `US_AQI` heatmap with a zoom level of 2,\nalong with the coordinates of each tile:\n\nSee [Map and Tile coordinates](/maps/documentation/javascript/coordinates)\nfor additional details.\n\nAbout the heatmap endpoint\n\nA heatmap tile is represented by a bytes array containing the tile data as a PNG\nimage. You request current air quality heatmap tiles using the\n[`heatmapTiles`](/maps/documentation/air-quality/reference/rest/v1/mapTypes.heatmapTiles/lookupHeatmapTile)\nendpoint by sending an HTTP GET request to: \n\n```html\nhttps://airquality.googleapis.com/v1/mapTypes/TYPE/heatmapTiles/Z/X/Y?key=YOUR_API_KEY\n```\n\nAll request parameters are required in a request:\n\n- `TYPE` - The type heatmap to return. See [allowed\n values](/maps/documentation/air-quality/reference/rest/v1/mapTypes.heatmapTiles/lookupHeatmapTile#maptype).\n\n- `Z` - Zoom level that determines how large or small the contents of a map\n appear in a map view. Allowed values are 0-16, where a value of 0 displays\n the entire world in a single tile.\n\n- `X`,`Y` - The coordinates of the tile to retrieve, relative to the north\n west corner (0,0). `X` values are increasing from west to east and `Y`\n values are increasing from north to south.\n\n Tile coordinates have to be valid for the specified zoom level.\n For example, if you set the zoom level to 2, and request a tile at\n coordinates of 10,10, the API returns an error.\n- `YOUR_API_KEY` - Your application's API key. This key identifies your\n application for purposes of quota management. For more information, see [get\n a key](/maps/documentation/air-quality/get-api-key).\n\nExample heatmap request\n\nThe image above shows a `US_AQI` heatmap with a zoom level of 2,\nalong with the coordinates of each tile. The following example uses the\n`heatmapTiles` endpoint to request the tile at coordinates 0,1 from the\nheatmap: \n\n```html\nhttps://airquality.googleapis.com/v1/mapTypes/US_AQI/heatmapTiles/2/0/1?key=YOUR_API_KEY\n```\n\nThe tile appears as:\n\nFor more information on overlaying tiles on top of the default map, see\n[Overlay Map Types](/maps/documentation/javascript/examples/maptype-overlay)."]]