Anúncio: todos os projetos não comerciais registrados para usar o Earth Engine antes de
15 de abril de 2025 precisam
verificar a qualificação não comercial para manter o acesso ao Earth Engine.
ui.Select.onChange
Mantenha tudo organizado com as coleções
Salve e categorize o conteúdo com base nas suas preferências.
Registra um callback que é disparado quando um item é selecionado.
Retorna um ID que pode ser transmitido para unlisten() para cancelar o registro da callback.
Uso | Retorna |
---|
Select.onChange(callback) | String |
Argumento | Tipo | Detalhes |
---|
isso: ui.select | ui.Select | A instância ui.Select. |
callback | Função | O callback a ser disparado quando um item é selecionado. O callback recebe o valor selecionado no momento e o widget de seleção. |
Exceto em caso de indicação contrária, o conteúdo desta página é licenciado de acordo com a Licença de atribuição 4.0 do Creative Commons, e as amostras de código são licenciadas de acordo com a Licença Apache 2.0. Para mais detalhes, consulte as políticas do site do Google Developers. Java é uma marca registrada da Oracle e/ou afiliadas.
Última atualização 2025-07-26 UTC.
[null,null,["Última atualização 2025-07-26 UTC."],[[["\u003cp\u003eRegisters a callback function that is triggered when a user selects an item in the ui.Select component.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eonChange()\u003c/code\u003e returns a unique ID that can be used to unregister the callback function using \u003ccode\u003eunlisten()\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eThe callback function receives the currently selected value and the ui.Select widget as arguments.\u003c/p\u003e\n"]]],["`onChange` registers a callback function that triggers upon item selection. This function receives the selected value and the `ui.Select` instance as arguments. The method returns a unique string ID. This ID is crucial for later removing the callback using the `unlisten()` function. The `ui.Select` instance is accessible within the callback through the 'this' keyword.\n"],null,["# ui.Select.onChange\n\n\u003cbr /\u003e\n\nRegisters a callback that's fired when an item is selected.\n\n\u003cbr /\u003e\n\nReturns an ID which can be passed to unlisten() to unregister the callback.\n\n| Usage | Returns |\n|-----------------------------|---------|\n| Select.onChange`(callback)` | String |\n\n| Argument | Type | Details |\n|-------------------|-----------|---------------------------------------------------------------------------------------------------------------------------|\n| this: `ui.select` | ui.Select | The ui.Select instance. |\n| `callback` | Function | The callback to fire when an item is selected. The callback is passed the currently selected value and the select widget. |"]]