Google 地圖平台即將推出新版地圖樣式。新版地圖樣式內建全新的預設調色盤,並且提升地圖體驗、改善服務的可用性。所有地圖樣式都將於 2025 年 3 月自動更新。請參閱「
Google 地圖平台新版地圖樣式」一文,進一步瞭解適用範圍及如何提早啟用。
衛星圖塊
衛星圖塊是一種正射攝影。這些圖像是由衛星和機載相機拍攝,可提供從上而下 (天頂或近天頂) 的地球圖像。
取得衛星圖塊
取得工作階段權杖後,您就可以開始提出衛星圖塊要求。由於工作階段權杖會套用至整個工作階段,因此您不必在資訊方塊要求中指定地圖選項。
下列程式碼範例示範衛星圖塊的一般工作階段權杖要求。
curl -X POST -d '{
"mapType": "satellite",
"language": "en-US",
"region": "US"
}' \
-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"
資訊方塊要求範例
請參考下列程式碼範例,該程式碼會要求單一衛星圖塊,其縮放等級為 15,且 x 和 y 座標為 (6294, 13288)。
curl "https://tile.googleapis.com/v1/2dtiles/15/6294/13288?session=YOUR_SESSION_TOKEN&key=YOUR_API_KEY" --output /tmp/example_tile.png
本例中沒有伺服器的回應訊息。相反地,圖塊只會下載到本機檔案。
![衛星圖塊回應](https://developers.google.cn/static/maps/documentation/tile/images/satellite-example-2.png?authuser=7&hl=zh-tw)
如要瞭解回應訊息標頭,請參閱「預先擷取、快取或儲存內容」。
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2025-02-05 (世界標準時間)。
[null,null,["上次更新時間:2025-02-05 (世界標準時間)。"],[[["Satellite image tiles are a type of orthophotography providing top-down imagery of the earth, captured by satellite and airborne cameras."],["To request satellite tiles, you need to obtain a session token using your API key, specifying map type, language, and region."],["You can then download individual tiles by making HTTPS GET requests, including the zoom level (z), x and y coordinates, session token, and API key in the URL."],["An example request shows downloading a tile at zoom level 15 with specific coordinates to a local file, with no server response message besides the downloaded tile."]]],[]]