熱視圖
heatmapTiles
端點透過圖塊疊加層提供花粉相關的熱視圖。圖塊疊加層
是可在「Google 地圖」上方顯示的圖片圖塊集。每項
圖片圖塊就是 256 x 256 像素
圖塊疊加層是透過一組圖塊組合而成的格狀檢視畫面,每個圖塊都被指派
(X
,Y
) 座標。座標為 (0,0) 的圖塊一律位於
地圖的西北角。X
值由西到東遞增,
Y
值由北到南遞增。
zoom level
可決定地圖內容在
地圖檢視。圖塊格線大小取決於縮放 X
和 Y
依據縮放等級,以指數方式進行座標。
gridSizeX = XzoomLevel
gridSizeY = YzoomLevel
例如,縮放等級為 2 時,世界地圖是以 4 x 4 來表示
矩陣,總共 16 個圖塊。
下圖顯示了全世界各個時段的 TREE_UPI
熱視圖,
轉換為可以在縮放等級 2 存取的圖塊。

請參閱地圖和圖塊
座標
來瞭解詳情。
您可以使用 要求目前花粉的熱視圖圖塊
heatmapTiles
方法是傳送 HTTP GET 要求到:
https://pollen.googleapis.com/v1/mapTypes/TYPE/heatmapTiles/Z/X/Y?key=YOUR_API_KEY
關於熱視圖端點
成功請求時,需要下列所有參數:
KEY
:應用程式的 API 金鑰。這組金鑰會找出
方便您管理配額瞭解如何取得
鍵。
TYPE
:要傳回的熱視圖類型。查看允許
值。
Z
:決定地圖內容大小的縮放等級
出現在地圖檢視中有效值為 0 到 16,值為 0 會顯示
全世界。
X
、Y
:相對於東北角 (0,0) 的圖塊座標。X
值從西到東增加,Y
值則從北到增加
南。座標必須能對指定的縮放等級有效。例如:
如果您將縮放等級設為 2,並在座標 (10,10) 要求地圖方塊,
API 會傳回錯誤
熱視圖要求範例
上圖顯示縮放等級為 2 的 TREE_UPI
熱視圖,以及
每個圖塊的座標。以下範例使用 heatmapTiles
端點要求位於座標 (2,1) 的地圖方塊:
https://pollen.googleapis.com/v1/mapTypes/TREE_UPI/heatmapTiles/2/2/1?key=YOUR_API_KEY
這個方塊會以可覆蓋在地圖上的圖片形式顯示:

如要進一步瞭解如何在預設地圖上方疊加圖塊,請查閱
疊加層地圖類型。
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2024-08-16 (世界標準時間)。
[null,null,["上次更新時間:2024-08-16 (世界標準時間)。"],[[["The heatmapTiles endpoint delivers pollen heatmaps as tile overlays, which are collections of 256x256 pixel image tiles displayed on top of Google Maps."],["Tile coordinates (X,Y) determine the grid position, with (0,0) at the northwest corner and increasing values eastward for X and southward for Y."],["Zoom level (Z) controls map content size and grid dimensions, ranging from 0 (entire world) to 16, influencing tile coordinates validity."],["To request heatmap tiles, use the heatmapTiles endpoint with required parameters: API key, heatmap type, zoom level, and tile coordinates (X,Y)."],["You can overlay these pollen heatmap tiles onto existing maps for visualization, enhancing applications with pollen information."]]],["The `heatmapTiles` endpoint provides pollen heatmaps as image tiles (256x256 pixels) overlaid on Google Maps. Tiles are arranged in a grid with (X,Y) coordinates, starting from (0,0) in the northwest. The zoom level (0-16) dictates map detail, scaling the grid exponentially (gridSizeX = X^zoomLevel). A request to the endpoint requires an API key, heatmap `TYPE`, `Z` zoom level, and `X`, `Y` tile coordinates. The format for a request is: `https://pollen.googleapis.com/v1/mapTypes/TYPE/heatmapTiles/Z/X/Y?key=YOUR_API_KEY`\n"]]