热图
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
heatmapTiles 端点通过图块叠加层提供与花粉相关的热图。图块叠加层是一组可显示在 Google 地图顶部的图片图块。每个图片图块的大小为 256 x 256 像素。
图块叠加层是由一组图块组成的网格,每个图块都分配有 (X
,Y
) 坐标。坐标为 (0,0) 的图块始终位于地图的西北角。X
值从西向东增加,而 Y
值从北向南增加。
zoom level
决定了地图视图中地图内容的大小。图块网格大小是通过按缩放级别以指数方式缩放 X
和 Y
坐标来确定的。
gridSizeX = XzoomLevel
gridSizeY = YzoomLevel
例如,在缩放级别为 2 时,世界地图使用 4x4 矩阵表示,总共有 16 个图块。
下图显示了整个世界的 TREE_UPI
热图,该热图分为多个图块,可在缩放级别为 2 时访问。

如需了解详情,请参阅地图和图块坐标。
您可以通过向以下网址发送 HTTP GET 请求,使用
heatmapTiles 端点请求当前的花粉热力图图块:
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
图块以可叠加在地图上的图片形式显示:

如需详细了解如何在默认地图上叠加图块,请参阅叠加地图类型。
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-07-22。
[null,null,["最后更新时间 (UTC):2025-07-22。"],[[["\u003cp\u003eThe heatmapTiles endpoint delivers pollen heatmaps as tile overlays, which are collections of 256x256 pixel image tiles displayed on top of Google Maps.\u003c/p\u003e\n"],["\u003cp\u003eTile coordinates (X,Y) determine the grid position, with (0,0) at the northwest corner and increasing values eastward for X and southward for Y.\u003c/p\u003e\n"],["\u003cp\u003eZoom level (Z) controls map content size and grid dimensions, ranging from 0 (entire world) to 16, influencing tile coordinates validity.\u003c/p\u003e\n"],["\u003cp\u003eTo request heatmap tiles, use the heatmapTiles endpoint with required parameters: API key, heatmap type, zoom level, and tile coordinates (X,Y).\u003c/p\u003e\n"],["\u003cp\u003eYou can overlay these pollen heatmap tiles onto existing maps for visualization, enhancing applications with pollen information.\u003c/p\u003e\n"]]],["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"],null,["The\n[heatmapTiles](/maps/documentation/pollen/reference/rest/v1/mapTypes.heatmapTiles/lookupHeatmapTile)\nendpoint provides pollen-related heatmaps through tile overlay. A tile overlay\nis a collection of image tiles that can be displayed on top of Google Maps. Each\nimage tile is 256 x 256 pixels.\n\nThe tile overlay is a grid assembled from a collection of tiles, each assigned\n(`X`,`Y`) coordinates. The tile with coordinates (0,0) is always at the\nnorthwest corner of the map. The `X` values increase from west to east, while\nthe `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.\n\nThe following image shows a `TREE_UPI` heatmap of the entire world, sectioned\ninto tiles that can be accessed at a zoom level of 2.\n\nSee [Map and Tile\ncoordinates](/maps/documentation/javascript/coordinates#tile-coordinates) for\nadditional details.\n\nYou can request current pollen heatmap tiles using the [heatmapTiles](/maps/documentation/pollen/reference/rest/v1/mapTypes.heatmapTiles/lookupHeatmapTile)\nendpoint by sending an HTTP GET request to: \n\n```html\nhttps://pollen.googleapis.com/v1/mapTypes/TYPE/heatmapTiles/Z/X/Y?key=YOUR_API_KEY\n```\n\nAbout the heatmap endpoint\n\nAll parameters listed below are required for a successful request:\n\n- `KEY`: Your application's API key. This key identifies your application for purposes of quota management. Learn how to [get a\n key](/maps/documentation/pollen/get-api-key).\n- `TYPE`: The type of heatmap to return. See [allowed\n values](/maps/documentation/pollen/reference/rest/v1/mapTypes.heatmapTiles/lookupHeatmapTile#maptype).\n- `Z`: Zoom level that determines how large or small the contents of a map appear in a map view. Allowed values are 0-16, where a value of 0 displays the entire world in a single tile.\n- `X`,`Y`: The tile coordinates relatively to the north east corner (0,0). `X` values increase from west to east and `Y` values increase from north to south. Coordinates must be valid for the specified zoom level. For example, if you set the zoom level to 2 and request a tile at coordinates (10,10), the API returns an error.\n\nExample heatmap request\n\nThe image above shows a `TREE_UPI` heatmap with a zoom level of 2, along with\nthe coordinates of each tile. The following example uses the `heatmapTiles`\nendpoint to request the tile at coordinates (2,1): \n\n```html\nhttps://pollen.googleapis.com/v1/mapTypes/TREE_UPI/heatmapTiles/2/2/1?key=YOUR_API_KEY\n```\n\nThe tile appears as an image that can be overlaid on a map:\n\nFor more information on overlaying tiles on top of the default map, see\n[Overlay Map Types](/maps/documentation/javascript/examples/maptype-overlay)."]]