Announcement: All noncommercial projects registered to use Earth Engine before
April 15, 2025 must
verify noncommercial eligibility to maintain Earth Engine access.
ui.root.insert
Stay organized with collections
Save and categorize content based on your preferences.
Inserts a widget into to the root panel at the specified index.
Returns the root panel.
Usage | Returns | ui.root.insert(index, widget) | ui.Panel |
Argument | Type | Details | index | Number | The index at which to insert the widget. |
widget | ui.Widget | The widget to insert. |
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2023-10-06 UTC.
[null,null,["Last updated 2023-10-06 UTC."],[[["\u003cp\u003eThe \u003ccode\u003eui.root.insert()\u003c/code\u003e function adds a specified widget to the main user interface panel at a designated index.\u003c/p\u003e\n"],["\u003cp\u003eThis function returns the root panel itself, allowing for method chaining.\u003c/p\u003e\n"],["\u003cp\u003eDevelopers can control widget placement by specifying the index within the root panel.\u003c/p\u003e\n"],["\u003cp\u003eThe function accepts a numerical index and a \u003ccode\u003eui.Widget\u003c/code\u003e object as parameters.\u003c/p\u003e\n"]]],["The core content details how to insert a widget into the root panel. `ui.root.insert(index, widget)` is used, returning `ui.Panel`. The `index` argument, a number, specifies the insertion location. The `widget` argument, of type `ui.Widget`, is the element being added. The method places the widget at the designated index within the root panel, effectively modifying the panel's structure.\n"],null,["# ui.root.insert\n\n\u003cbr /\u003e\n\nInserts a widget into to the root panel at the specified index.\n\n\u003cbr /\u003e\n\nReturns the root panel.\n\n| Usage | Returns |\n|---------------------------------|----------|\n| `ui.root.insert(index, widget)` | ui.Panel |\n\n| Argument | Type | Details |\n|----------|-----------|------------------------------------------|\n| `index` | Number | The index at which to insert the widget. |\n| `widget` | ui.Widget | The widget to insert. |"]]