

翻訳は機械翻訳により提供されています。提供された翻訳内容と英語版の間で齟齬、不一致または矛盾がある場合、英語版が優先します。

# 静的マップにスケールを追加する方法
<a name="add-scale-static-map"></a>

このトピックでは、Amazon Location Service で生成した静的マップの右下隅にスケールを表示する方法について説明します。スケールは、`Miles` や `Kilometers` などの単一の単位、または `KilometersMiles` や `MilesKilometers` などの両方の単位を表示でき、この場合、一方の単位が上部に表示され、もう一方の単位が下部に表示されます。

## 単一の単位でスケールを追加する
<a name="add-scale-single-unit"></a>

この例では、スケールを右下隅で `Kilometers` に設定して、フィンランドのヘルシンキのマップを表示します。

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

```
https://maps.geo.eu-central-1.amazonaws.com/v2/static/map?style=Satellite&width=1024&height=1024&zoom=13.5&center=24.9189564,60.1645772&scale-unit=Kilometers&key=API_KEY
```

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

![\[Aerial view of a coastal city with dense urban areas, waterways, and islands.\]](http://docs.aws.amazon.com/ja_jp/location/latest/developerguide/images/static-scale-single.png)


------

## 両方の単位でスケールを追加する
<a name="add-scale-both-units"></a>

この例では、右下隅で `Kilometers` と `Miles` の両方がスケールに表示され、一方の単位が他方の上に表示される状態でフィンランドのヘルシンキのマップを表示します。

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

```
https://maps.geo.eu-central-1.amazonaws.com/v2/static/map?style=Satellite&width=1024&height=1024&zoom=14&center=24.9189564,60.1645772&scale-unit=KilometersMiles&key=API_KEY
```

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

![\[Aerial view of a coastal city with dense urban areas, harbors, and islands surrounded by water.\]](http://docs.aws.amazon.com/ja_jp/location/latest/developerguide/images/static-scale-both.png)


------