Earth Engine is introducing
noncommercial quota tiers to safeguard shared compute resources and ensure reliable performance for everyone. All noncommercial projects will need to select a quota tier by
April 27, 2026 or will use the Community Tier by default. Tier quotas will take effect for all projects (regardless of tier selection date) on
April 27, 2026.
Learn more.
ui.Select.onChange
Stay organized with collections
Save and categorize content based on your preferences.
Registers a callback that's fired when an item is selected.
Returns an ID which can be passed to unlisten() to unregister the callback.
| Usage | Returns | Select.onChange(callback) | String |
| Argument | Type | Details | this: ui.select | ui.Select | The ui.Select instance. |
callback | Function | The callback to fire when an item is selected. The callback is passed the currently selected value and the select widget. |
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."],[],["`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"]]