

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

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

在本主題中，您將了解如何根據特定參數從 Amazon Location Service 擷取靜態地圖。您將了解如何為中心位置、週框方塊和一組週框位置產生靜態映射。提供的範例可協助您自訂地圖的寬度、高度和樣式。

**注意**  
產生靜態映射`map@2x`時，您必須傳遞 `map`或 。

## 取得中心位置的地圖影像
<a name="get-map-center-position"></a>

在此範例中，您將建立寬度為 `1024`且高度為 的地圖影像`1024`，中心座標設定為 `-123.1143,49.2763`，其中 `longitude=-123.1143`和 `latitude=49.2763`，縮放層級為 `15`。

------
#### [ Request URL ]

```
https://maps.geo.eu-central-1.amazonaws.com/v2/static/map?style=Satellite&width=1024&height=1024&zoom=15&center=-123.1156126,49.2767046&key=API_KEY
```

------
#### [ Response image ]

![\[Aerial view of a coastal city with dense urban layout, harbor, and large stadium visible.\]](http://docs.aws.amazon.com/zh_tw/location/latest/developerguide/images/static-center.png)


------

## 取得週框方塊的地圖影像
<a name="get-map-bounding-box"></a>

在此範例中，您將設定區域的週框方塊，以產生東南亞的地圖影像。

`bbox` 格式為 `{southwest_longitude},{southwest_latitude},{northeast_longitude},{northeast_latitude}`。

------
#### [ Request URL ]

```
https://maps.geo.eu-central-1.amazonaws.com/v2/static/map?style=Satellite&width=1024&height=1024&bounding-box=90.00,-21.94,146.25,31.95&key=API_KEY
```

------
#### [ Response image ]

![\[Satellite view of Southeast Asia, showing mainland, islands, and surrounding waters.\]](http://docs.aws.amazon.com/zh_tw/location/latest/developerguide/images/static-bounding-box.png)


------

## 取得邊界位置的地圖影像
<a name="get-map-bounded-positions"></a>

在此範例中，您將產生地圖，涵蓋巴黎的數個必看位置，每個位置都由其座標 （經度、緯度） 指定。邊界位置包括：Eiffel Tower、Louvre 美術館、Notre-Dame Cathedral、Champs-@@lysées、Arc de Triomphe、Sacvalu-Cœur Basilica、Luxembourg Gardens、Musée d'Orsay、Place de la Concorde 和 Palais Garnier。

邊界位置的格式為 `{longitude1},{latitude1},{longitude2},{latitude2} ... {longitudeN},{latitudeN}`。

------
#### [ Request URL ]

```
https://maps.geo.eu-central-1.amazonaws.com/v2/static/map?style=Satellite&width=1024&height=1024&bounded-positions=2.2945,48.8584,2.3376,48.8606,2.3500,48.8529,2.3076,48.8698,2.2950,48.8738,2.3431,48.8867,2.3372,48.8462,2.3266,48.8600,2.3212,48.8656,2.3317,48.8719&key=API_KEY
```

------
#### [ Response image ]

![\[Aerial view of Paris showing dense urban layout, Seine River, and iconic landmarks.\]](http://docs.aws.amazon.com/zh_tw/location/latest/developerguide/images/static-bounding-position.png)


------