お知らせ:
2025 年 4 月 15 日より前に Earth Engine の使用を登録したすべての非商用プロジェクトは、Earth Engine へのアクセスを維持するために
非商用目的での利用資格を確認する必要があります。
ui.Map.onChangeBounds
コレクションでコンテンツを整理
必要に応じて、コンテンツの保存と分類を行います。
地図の境界が変更されたときに呼び出されるコールバックを登録します。これは、パン、ズーム、地図の境界がプログラムで変更されたときに発生します。
コールバックの登録を解除するために unlisten() に渡すことができる ID を返します。
用途 | 戻り値 |
---|
Map.onChangeBounds(callback) | 文字列 |
引数 | タイプ | 詳細 |
---|
これ: ui.map | ui.Map | ui.Map インスタンス。 |
callback | 関数 | 地図の境界が変更されたときに呼び出されるコールバック。コールバックには、新しい地図の中心の座標(キーは lon、lat、zoom)を含むオブジェクトと地図ウィジェット自体の 2 つのパラメータが渡されます。 |
特に記載のない限り、このページのコンテンツはクリエイティブ・コモンズの表示 4.0 ライセンスにより使用許諾されます。コードサンプルは Apache 2.0 ライセンスにより使用許諾されます。詳しくは、Google Developers サイトのポリシーをご覧ください。Java は Oracle および関連会社の登録商標です。
最終更新日 2025-07-26 UTC。
[null,null,["最終更新日 2025-07-26 UTC。"],[[["\u003cp\u003eRegisters a callback function that is triggered whenever the map's boundaries are modified, including panning, zooming, and programmatic changes.\u003c/p\u003e\n"],["\u003cp\u003eProvides a unique ID that can be used with the \u003ccode\u003eunlisten()\u003c/code\u003e function to remove the registered callback.\u003c/p\u003e\n"],["\u003cp\u003eThe callback function receives the new map center coordinates (longitude, latitude, and zoom level) and the map widget instance as arguments.\u003c/p\u003e\n"]]],["The `onChangeBounds` function registers a callback to be executed whenever the map's bounds change due to panning, zooming, or programmatic updates. It returns a unique string ID for the callback. The callback function receives two parameters: an object with the new map center's longitude, latitude, and zoom level, and the map widget. The returned ID can be used with `unlisten()` to remove the registered callback.\n"],null,["# ui.Map.onChangeBounds\n\n\u003cbr /\u003e\n\nRegisters a callback that's fired when the map bounds change. This is fired during pan, zoom, and when the map's bounds are changed programmatically.\n\n\u003cbr /\u003e\n\nReturns an ID which can be passed to unlisten() to unregister the callback.\n\n| Usage | Returns |\n|--------------------------------|---------|\n| Map.onChangeBounds`(callback)` | String |\n\n| Argument | Type | Details |\n|----------------|----------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| this: `ui.map` | ui.Map | The ui.Map instance. |\n| `callback` | Function | The callback to fire when the map bounds change. The callback is passed two parameters: an object containing the coordinates of the new map center (with keys lon, lat, and zoom) and the map widget itself. |"]]