Google 地圖平台即將推出新版地圖樣式。新版地圖樣式內建全新的預設調色盤,並且提升地圖體驗、改善服務的可用性。所有地圖樣式都將於 2025 年 3 月自動更新。請參閱「
Google 地圖平台新版地圖樣式」一文,進一步瞭解適用範圍及如何提早啟用。
地形圖塊
地形圖塊是包含陰影地圖和等高線的影像圖塊。包括植被等自然地形。
取得地形資訊方塊
取得工作階段權杖後,即可開始發出地形圖塊要求。由於工作階段權杖會套用至整個工作階段,因此您不必在資訊方塊要求中指定地圖選項。
以下程式碼範例示範地形圖塊的一般工作階段權杖要求。
curl -X POST -d '{
"mapType": "terrain",
"language": "en-US",
"region": "US",
"layerTypes": ["layerRoadmap"]
}' \
-H 'Content-Type: application/json' \
"https://tile.googleapis.com/v1/createSession?key=YOUR_API_KEY"
您可以透過發出 HTTPS GET 要求來取得地形圖塊,如以下範例所示。
curl "https://tile.googleapis.com/v1/2dtiles/z/x/y?session=YOUR_SESSION_TOKEN&key=YOUR_API_KEY"
資訊方塊要求範例
請參考以下範例,該範例會要求單一縮放等級 10 的陸地資訊方塊,其 X 和 Y 座標為 (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
本例中沒有伺服器的回應訊息。相反地,圖塊只會下載到本機檔案。

如要瞭解回應訊息標頭,請參閱「預先擷取、快取或儲存內容」。
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2025-02-28 (世界標準時間)。
[null,null,["上次更新時間:2025-02-28 (世界標準時間)。"],[[["Terrain tiles are image tiles that visually represent geographical features like hills, contours, and vegetation."],["To request terrain tiles, you first need to obtain a session token using your API key and specifying map parameters."],["You can then retrieve individual terrain tiles using an HTTPS GET request, providing the session token, API key, and desired tile coordinates (zoom level, x, and y)."],["Terrain tiles are downloaded directly as image files without a server response message, allowing easy integration into mapping applications."]]],["Terrain tiles, which include hillshade mapping, contour lines, and natural features, are accessed by first obtaining a session token via a POST request specifying the map type, language, region, and layer types. Subsequently, tiles are retrieved with HTTPS GET requests, providing the zoom level (z), x and y coordinates, and the session token. An example demonstrates requesting a tile at zoom level 10, with coordinates (192, 401). The tile data downloads to a local file, without a server response message.\n"]]