如何決定靜態地圖的半徑和縮放 - Amazon Location Service

本文為英文版的機器翻譯版本,如內容有任何歧義或不一致之處,概以英文版為準。

如何決定靜態地圖的半徑和縮放

在本主題中,您將了解如何在透過 Amazon Location Service 產生靜態地圖zoom時,選擇使用 radius或 。radius 參數可更精確地控制涵蓋範圍,因此非常適合您了解確切涵蓋範圍的客戶面向應用程式。當您想要調整顯示的詳細資訊層級時, zoom 參數更適合用於地理空間分析。

使用半徑

在此範例中,您將使用具有中心位置的 radius 參數建立斯里蘭卡的地圖影像。

Request URL
https://maps.geo.eu-central-1.amazonaws.com/v2/static/map?style=Satellite&width=700&height=700&center=80.60596,7.76671&radius=235000&scale-unit=KilometersMiles&key=API_KEY
Response image
Satellite view of Sri Lanka, showing the teardrop-shaped island nation surrounded by ocean.

使用縮放

在此範例中,您將使用具有中心位置的 zoom 參數建立斯里蘭卡的地圖影像。

Request URL
https://maps.geo.eu-central-1.amazonaws.com/v2/static/map?style=Satellite&width=700&height=700&zoom=8&center=80.60596,7.76671&scale-unit=KilometersMiles&key=API_KEY
Response image
Satellite view of Sri Lanka, showing the teardrop-shaped island nation surrounded by ocean.