Terrain tiles

Terrain Tile overviewTerrain tiles are image tiles that contain hillshade mapping and contour lines. They include natural features such as vegetation.

Getting terrain tiles

You can begin making terrain tile requests after you get a session token. Because a session token applies to the entire session, you don't have to specify the map options with your tile requests.

The following code sample demonstrates a typical session token request for terrain tiles.

curl -X POST -d '{
  "mapType": "terrain",
  "language": "en-US",
  "region": "US",
  "layerTypes": ["layerRoadmap"]
}' \
-H 'Content-Type: application/json' \

You get terrain tiles by making an HTTPS GET request, as shown in the following example.

curl "https://tile.googleapis.com/v1/2dtiles/z/x/y?session=YOUR_SESSION_TOKEN&key=YOUR_API_KEY&orientation=0_or_90_or_180_or_270"

Example tile request

Consider the following example, which requests a single terrain tile with zoom level 10, with x and y coordinates of (192, 401).

curl "https://tile.googleapis.com/v1/2dtiles/10/192/401?session=YOUR_SESSION_TOKEN&key=YOUR_API_KEY" --output /tmp/example_tile.png

There is no response message from the server in this example. Instead, the tile just downloads to a local file.

Terrain Tile download response

For information about response message headers, see Pre-Fetching, Caching, or Storage of Content.