Google Maps Platform 即将推出全新地图样式。此次地图样式更新包括全新默认调色板,以及地图体验和易用性方面的改进。所有地图样式将于 2025 年 3 月自动更新。如需详细了解适用范围以及如何提前选择启用,请参阅
全新 Google Maps Platform 地图样式。
卫星图块
卫星图像图块是一种正射影像。这些图像由卫星和机载相机拍摄,可提供地球的俯视图像(天顶或近天顶图像)。
获取卫星图块
获取会话令牌后,您就可以开始发出卫星图块请求了。由于会话令牌适用于整个会话,因此您无需在功能块请求中指定地图选项。
以下代码示例演示了卫星图块的典型会话令牌请求。
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=0&hl=lt)
如需了解响应消息标头,请参阅预取、缓存或存储内容。
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-02-05。
[null,null,["最后更新时间 (UTC):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."]]],[]]