Annuncio: tutti i progetti non commerciali registrati per l'utilizzo di Earth Engine prima del
15 aprile 2025 devono
verificare l'idoneità non commerciale per mantenere l'accesso a Earth Engine.
ui.root.add
Mantieni tutto organizzato con le raccolte
Salva e classifica i contenuti in base alle tue preferenze.
Aggiunge un widget al pannello principale.
Restituisce il pannello principale.
Utilizzo | Resi |
---|
ui.root.add(widget) | ui.Panel |
Argomento | Tipo | Dettagli |
---|
widget | ui.Widget | Il widget da aggiungere. |
Esempi
Editor di codice (JavaScript)
// Replace the default UI widgets with a few custom widgets.
ui.root.clear();
ui.root.add(
ui.Panel({
widgets:[
ui.Label('This is a custom user interface.'),
],
style: {border: '5px solid green'}
})
);
ui.root.add(ui.Map());
Salvo quando diversamente specificato, i contenuti di questa pagina sono concessi in base alla licenza Creative Commons Attribution 4.0, mentre gli esempi di codice sono concessi in base alla licenza Apache 2.0. Per ulteriori dettagli, consulta le norme del sito di Google Developers. Java è un marchio registrato di Oracle e/o delle sue consociate.
Ultimo aggiornamento 2025-07-26 UTC.
[null,null,["Ultimo aggiornamento 2025-07-26 UTC."],[[["\u003cp\u003eThe \u003ccode\u003eui.root\u003c/code\u003e object allows you to add and manage widgets within the main user interface panel.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eadd()\u003c/code\u003e method specifically inserts a specified widget into the root panel, modifying the display.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eclear()\u003c/code\u003e method can be used to remove existing widgets, providing flexibility in UI customization.\u003c/p\u003e\n"]]],[],null,["# ui.root.add\n\n\u003cbr /\u003e\n\nAdds a widget to the root panel.\n\n\u003cbr /\u003e\n\nReturns the root panel.\n\n| Usage | Returns |\n|-----------------------|----------|\n| `ui.root.add(widget)` | ui.Panel |\n\n| Argument | Type | Details |\n|----------|-----------|-------------------------|\n| `widget` | ui.Widget | The widget to be added. |\n\nExamples\n--------\n\n### Code Editor (JavaScript)\n\n```javascript\n// Replace the default UI widgets with a few custom widgets.\nui.root.clear();\nui.root.add(\n ui.Panel({\n widgets:[\n ui.Label('This is a custom user interface.'),\n ],\n style: {border: '5px solid green'}\n })\n);\nui.root.add(ui.Map());\n```"]]