

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

# 如何取得特定維度的靜態映射
<a name="get-static-map-specific-dimension"></a>

在本主題中，您將了解如何使用 Amazon Location Service 設定靜態地圖的維度 （高度和寬度）。自訂地圖影像的維度可讓您平衡效能、視覺品質和可用性。`width` 和 的最大值`height`為 1400 像素，而最小值為 64 像素。結果大小上限為 6 MB。

此外，您可以使用 `bbox`和 `bounds` 參數以及 `padding` ，以確保邊緣附近的重要地圖功能完全可見，不會中斷。

## 取得具有特定高度和寬度的地圖影像
<a name="get-map-specific-dimension"></a>

在此範例中，您將建立芬蘭赫爾辛基的低解析度和中解析度地圖影像。

------
#### [ Request URL for low-resolution thumbnail ]

```
https://maps.geo.eu-central-1.amazonaws.com/v2/static/map?style=Satellite&width=200&height=200&zoom=11.5&center=24.9460,60.1690&key=API_KEY
```

------
#### [ Response (Thumbnail 200x200) ]

![\[Aerial view of a coastal city with intricate waterways, islands, and urban development.\]](http://docs.aws.amazon.com/zh_tw/location/latest/developerguide/images/static-specific-dimension-low.png)


------
#### [ Request URL for mid-resolution image ]

```
https://maps.geo.eu-central-1.amazonaws.com/v2/static/map?style=Satellite&width=700&height=700&zoom=13&center=24.9460,60.1690&key=API_KEY
```

------
#### [ Response image (700x700) ]

![\[Aerial view of a coastal city with dense urban development, harbors, and surrounding waters.\]](http://docs.aws.amazon.com/zh_tw/location/latest/developerguide/images/static-specific-dimension-mid.png)


------

## 取得貼圖影像，並在兩側加上填補
<a name="get-map-with-padding"></a>

在此範例中，您將使用芬蘭赫爾辛基的幾個必看位置，以及其座標 （經度、緯度） 來產生地圖，無論是否有填補。

------
#### [ Request URL with padding ]

```
https://maps.geo.eu-central-1.amazonaws.com/v2/static/map?style=Satellite&width=1024&height=1024&padding=150&bounded-positions=24.9526,60.1692,24.9850,60.1465,24.9270,60.1725,24.9226,60.1826,24.9509,60.1675,24.9566,60.1685,24.9457,60.1674,24.9397,60.1719,24.9414,60.1715,24.9387,60.1720&key=API_KEY
```

------
#### [ Response image (with padding) ]

![\[Aerial view of a coastal city with dense urban areas, harbors, and surrounding islands.\]](http://docs.aws.amazon.com/zh_tw/location/latest/developerguide/images/static-specific-dimension-padding.png)


------
#### [ Request URL without padding ]

```
https://maps.geo.eu-central-1.amazonaws.com/v2/static/map?style=Satellite&width=1024&height=1024&bounded-positions=24.9526,60.1692,24.9850,60.1465,24.9270,60.1725,24.9226,60.1826,24.9509,60.1675,24.9566,60.1685,24.9457,60.1674,24.9397,60.1719,24.9414,60.1715,24.9387,60.1720&key=API_KEY
```

------
#### [ Response image (without padding) ]

![\[Aerial view of a coastal city with dense urban areas, harbors, and small islands.\]](http://docs.aws.amazon.com/zh_tw/location/latest/developerguide/images/static-specific-dimension-no-padding.png)


------