The
[heatmapTiles](https://developers.google.com/maps/documentation/pollen/reference/rest/v1/mapTypes.heatmapTiles/lookupHeatmapTile.md.txt)
endpoint provides pollen-related heatmaps through tile overlay. A tile overlay
is a collection of image tiles that can be displayed on top of Google Maps. Each
image tile is 256 x 256 pixels.

The tile overlay is a grid assembled from a collection of tiles, each assigned
(`X`,`Y`) coordinates. The tile with coordinates (0,0) is always at the
northwest corner of the map. The `X` values increase from west to east, while
the `Y` values increase from north to south.

The `zoom level` determines how large or small the contents of a map appear in a
map view. The tile grid size is determined by scaling the `X` and `Y`
coordinates exponentially by the zoom level.

```
gridSizeX = XzoomLevel
gridSizeY = YzoomLevel
```

For example, at a zoom level of 2, the world map is represented using a 4 x 4
matrix, for a total of 16 tiles.

The following image shows a `TREE_UPI` heatmap of the entire world, sectioned
into tiles that can be accessed at a zoom level of 2.

![A heatmap of the entire world as a 4 by 4 grid.](https://developers.google.com/static/maps/images/pollenheatmap.svg)

See [Map and Tile
coordinates](https://developers.google.com/maps/documentation/javascript/coordinates#tile-coordinates) for
additional details.

You can request current pollen heatmap tiles using the [heatmapTiles](https://developers.google.com/maps/documentation/pollen/reference/rest/v1/mapTypes.heatmapTiles/lookupHeatmapTile.md.txt)
endpoint by sending an HTTP GET request to:

```html
https://pollen.googleapis.com/v1/mapTypes/TYPE/heatmapTiles/Z/X/Y?key=YOUR_API_KEY
```

## About the heatmap endpoint

All parameters listed below are required for a successful request:

- `KEY`: Your application's API key. This key identifies your application for purposes of quota management. Learn how to [get a
  key](https://developers.google.com/maps/documentation/pollen/get-api-key).
- `TYPE`: The type of heatmap to return. See [allowed
  values](https://developers.google.com/maps/documentation/pollen/reference/rest/v1/mapTypes.heatmapTiles/lookupHeatmapTile#maptype).
- `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.
- `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.

## Example heatmap request

The image above shows a `TREE_UPI` heatmap with a zoom level of 2, along with
the coordinates of each tile. The following example uses the `heatmapTiles`
endpoint to request the tile at coordinates (2,1):

```html
https://pollen.googleapis.com/v1/mapTypes/TREE_UPI/heatmapTiles/2/2/1?key=YOUR_API_KEY
```

The tile appears as an image that can be overlaid on a map:

![An example of a heatmap tile using the TREE_UPI map.](https://developers.google.com/static/maps/images/pollen-heatmap-example.png)

For more information on overlaying tiles on top of the default map, see
[Overlay Map Types](https://developers.google.com/maps/documentation/javascript/examples/maptype-overlay.md.txt).