お知らせ:
2025 年 4 月 15 日より前に Earth Engine の使用を登録したすべての非商用プロジェクトは、アクセスを維持するために
非商用目的での利用資格を確認する必要があります。2025 年 9 月 26 日までに確認が完了していない場合、アクセスが保留されることがあります。
ui.Map.setCenter
コレクションでコンテンツを整理
必要に応じて、コンテンツの保存と分類を行います。
指定された座標とズームレベルで地図ビューの中心を設定します。ズームレベルが指定されていない場合は、地図の最新のズームレベルが使用されます。
この ui.Map を返します。
| 用途 | 戻り値 |
|---|
Map.setCenter(lon, lat, zoom) | ui.Map |
| 引数 | タイプ | 詳細 |
|---|
これ: ui.map | ui.Map | ui.Map インスタンス。 |
lon | 数値 | 中心の経度(度単位)。 |
lat | 数値 | 中心の緯度(度単位)。 |
zoom | 数値、省略可 | ズームレベル(0 ~ 24)。 |
例
コードエディタ(JavaScript)
// Define a ui.Map widget.
var map = ui.Map();
// Set the position and optional zoom level of the map. Latitude must be
// within [-85, 85].
map.setCenter({lon: -123.6, lat: 47.7, zoom: 9});
print(map);
特に記載のない限り、このページのコンテンツはクリエイティブ・コモンズの表示 4.0 ライセンスにより使用許諾されます。コードサンプルは Apache 2.0 ライセンスにより使用許諾されます。詳しくは、Google Developers サイトのポリシーをご覧ください。Java は Oracle および関連会社の登録商標です。
最終更新日 2025-07-26 UTC。
[null,null,["最終更新日 2025-07-26 UTC。"],[],["The `Map.setCenter` function sets the map's center point using longitude (`lon`) and latitude (`lat`) coordinates. An optional `zoom` level, ranging from 0 to 24, can also be specified; otherwise, the map's current zoom is retained. The function requires a `ui.Map` instance, and the `lon` and `lat` are numerical degrees. Upon execution, it returns the modified `ui.Map` instance, updating the map's view.\n"]]