お知らせ:
2025 年 4 月 15 日より前に Earth Engine の使用を登録したすべての非商用プロジェクトは、Earth Engine へのアクセスを維持するために
非商用目的での利用資格を確認する必要があります。
ui.Map.DrawingTools.onLayerAdd
コレクションでコンテンツを整理
必要に応じて、コンテンツの保存と分類を行います。
レイヤが追加されたときに発生するコールバックを登録します。
コールバックの登録を解除するために unlisten() に渡すことができる ID を返します。
用途 | 戻り値 |
---|
DrawingTools.onLayerAdd(callback) | 文字列 |
引数 | タイプ | 詳細 |
---|
これ: ui.map.drawingtools | ui.Map.DrawingTools | ui.Map.DrawingTools インスタンス。 |
callback | 関数 | レイヤが追加されたときに起動するコールバック。コールバックには、追加された GeometryLayer と、イベント リスナーがバインドされている ui.Map.DrawingTools ウィジェットの 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 when a new layer is added to the map.\u003c/p\u003e\n"],["\u003cp\u003eReturns a unique ID that can be used to unregister the callback function with the \u003ccode\u003eunlisten()\u003c/code\u003e method.\u003c/p\u003e\n"],["\u003cp\u003eThe callback function receives the added GeometryLayer and the ui.Map.DrawingTools widget as parameters.\u003c/p\u003e\n"]]],[],null,["# ui.Map.DrawingTools.onLayerAdd\n\n\u003cbr /\u003e\n\nRegisters a callback that's fired when a layer is added.\n\n\u003cbr /\u003e\n\nReturns an ID which can be passed to unlisten() to unregister the callback.\n\n| Usage | Returns |\n|-------------------------------------|---------|\n| DrawingTools.onLayerAdd`(callback)` | String |\n\n| Argument | Type | Details |\n|-----------------------------|---------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| this: `ui.map.drawingtools` | ui.Map.DrawingTools | The ui.Map.DrawingTools instance. |\n| `callback` | Function | The callback to fire when a layer is added. The callback is passed two parameters: the added GeometryLayer and the ui.Map.DrawingTools widget that the event listener is bound to. |"]]