

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

# 樣式圖示圖形與精靈
<a name="styling-iconography-with-sprites"></a>

精靈是可攜式網路圖形 (PNG) 影像檔案，其中包含小型點陣影像，例如圖示、標記，以及在地圖上轉譯的其他元素。精靈可以根據樣式、顏色方案和變體等參數進行自訂。Amazon Location Service 透過 `GetSprites` API 提供精靈工作表。您也可以透過載入自己的圖示集 （請參閱[如何在地圖上新增圖示](how-to-add-icon-on-map.md)) 或自訂樣式描述項來載入自訂精靈，來使用自訂圖示。

如需詳細資訊，請參閱《*Amazon Location Service API 參考*》中的 [GetSprites](https://docs.aws.amazon.com/location/latest/APIReference/API_geomaps_GetSprites.html)。

## 使用案例
<a name="use-cases"></a>
+ 針對特定樣式和顏色方案使用精靈工作表轉譯自訂地圖元素。
+ 擷取各種地圖樣式的精靈，例如標準、單色或混合。
+ 透過修改精靈在地圖上自訂圖示圖形。

## 了解請求
<a name="styling-understand-the-request"></a>

請求需要 URI 參數，例如 `ColorScheme`、 `FileName`和 `Style`。這些參數允許根據映射的顏色方案、樣式和所需的特定精靈檔案來自訂精靈工作表。
+ **`ColorScheme`**：定義精靈的顏色方案，例如 "Light" 或 "Dark"。
+ **`FileName`**：要擷取的精靈檔案名稱，可以是 PNG 或 JSON 檔案。
+ **`Style`**：指定映射樣式，例如 "Standard" 或 "Monochrome"。

## 了解回應
<a name="styling-understand-the-response"></a>

回應包含 `CacheControl`、 `ContentType`和 等標頭`ETag`，並以二進位 Blob 或 JSON 檔案的形式傳回精靈資料。這些標頭提供快取資訊、回應的內容類型，以及精靈資料的版本控制。
+ **`CacheControl`**：快取精靈檔案的組態。
+ **`ContentType`**：回應的格式，指出其包含 PNG 或 JSON 資料。
+ **`ETag`**：精靈版本的識別符，用於快取驗證。
+ **`Blob`**：包含精靈工作表或 JSON 位移檔案的內文。

------
#### [ Standard Light ]

![Amazon Location Service Standard Light 樣式的地圖圖示精靈，包括彩色point-of-interest標記、道路護欄和導覽符號。](http://docs.aws.amazon.com/zh_tw/location/latest/developerguide/images/styling-standard-light.png)


------
#### [ Standard Dark ]

![Amazon Location Service Standard Dark 樣式的地圖圖示精靈圖，包括彩色point-of-interest標記、道路護欄和導覽符號。](http://docs.aws.amazon.com/zh_tw/location/latest/developerguide/images/styling-standard-dark.png)


------
#### [ Monochrome Light ]

![Amazon Location Service Monochrome Light 樣式的地圖圖示精靈，在光線背景上顯示淺色point-of-interest標記、道路防護和交通號誌。](http://docs.aws.amazon.com/zh_tw/location/latest/developerguide/images/styling-monochrome-light.png)


------
#### [ Monochrome Dark ]

![Amazon Location Service Monochrome Dark 樣式的地圖圖示精靈圖，在深色背景上顯示淺色point-of-interest標記、道路防護和交通號誌。](http://docs.aws.amazon.com/zh_tw/location/latest/developerguide/images/styling-monochrome-dark.png)


------
#### [ Hybrid ]

![Amazon Location Service Hybrid (Satellite) 樣式的地圖圖示精靈，包括道路遮蔽、交通號誌和衛星影像上使用的導覽標記。](http://docs.aws.amazon.com/zh_tw/location/latest/developerguide/images/styling-hybrid.png)


------