Announcement: All noncommercial projects registered to use Earth Engine before
April 15, 2025 must
verify noncommercial eligibility to maintain access. If you have not verified by September 26, 2025, your access may be on hold.
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"]]