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.Slider.onSlide
Mantieni tutto organizzato con le raccolte
Salva e classifica i contenuti in base alle tue preferenze.
Registra un callback che viene attivato quando cambia lo stato del cursore. Il callback verrà richiamato ripetutamente mentre l'utente trascina il cursore.
Restituisce un ID che può essere passato a unlisten() per annullare la registrazione del callback.
Utilizzo | Resi |
---|
Slider.onSlide(callback) | Stringa |
Argomento | Tipo | Dettagli |
---|
questo: ui.slider | ui.Slider | L'istanza ui.Slider. |
callback | Funzione | Il callback da attivare quando cambia lo stato del cursore. Il callback riceve il valore attuale del cursore. |
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\u003e\u003ccode\u003eSlider.onSlide\u003c/code\u003e registers a callback function that is triggered repeatedly as the user interacts with the slider, providing real-time updates on the slider's value.\u003c/p\u003e\n"],["\u003cp\u003eThis function returns a unique ID that can be used with \u003ccode\u003eunlisten()\u003c/code\u003e to remove the registered callback when it's no longer needed.\u003c/p\u003e\n"],["\u003cp\u003eThe callback function receives the current value of the slider as an argument, allowing you to perform actions based on the slider's state.\u003c/p\u003e\n"]]],["Registers a callback function triggered by slider state changes, particularly during user dragging. The `onSlide` method accepts a callback function as an argument, which receives the slider's current value. It returns a unique ID used to unregister the callback later with `unlisten()`. The method is used on a `ui.Slider` instance and allows repeated invocation of the callback while the slider state changes.\n"],null,["# ui.Slider.onSlide\n\n\u003cbr /\u003e\n\nRegisters a callback that's fired when the slider's state changes. The callback will be invoked repeatedly while the user is dragging the slider.\n\n\u003cbr /\u003e\n\nReturns an ID which can be passed to unlisten() to unregister the callback.\n\n| Usage | Returns |\n|----------------------------|---------|\n| Slider.onSlide`(callback)` | String |\n\n| Argument | Type | Details |\n|-------------------|-----------|----------------------------------------------------------------------------------------------------------|\n| this: `ui.slider` | ui.Slider | The ui.Slider instance. |\n| `callback` | Function | The callback to fire when the slider's state changes. The callback is passed the slider's current value. |"]]