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
Mantieni tutto organizzato con le raccolte
Salva e classifica i contenuti in base alle tue preferenze.
Un target trascinabile che varia linearmente tra due valori numerici. Il valore del cursore viene visualizzato come etichetta accanto.
Utilizzo | Resi |
---|
ui.Slider(min, max, value, step, onChange, direction, disabled, style) | ui.Slider |
Argomento | Tipo | Dettagli |
---|
min | Numero, facoltativo | Il valore minimo. Il valore predefinito è 0. |
max | Numero, facoltativo | Il valore massimo. Il valore predefinito è 1. |
value | Numero, facoltativo | Il valore iniziale. Il valore predefinito è 0. |
step | Numero, facoltativo | La dimensione del passo per il cursore. Il valore predefinito è 0,01. |
onChange | Funzione, facoltativa | Un callback da attivare quando cambia lo stato del cursore. Il callback riceve il valore attuale del cursore e il widget cursore. |
direction | Stringa, facoltativa | La direzione del cursore. Può assumere uno di due valori:
"horizontal" o "vertical". Il valore predefinito è "horizontal". |
disabled | Booleano, facoltativo | Indica se il cursore è disattivato. Il valore predefinito è false. |
style | Oggetto, facoltativo | Un oggetto di stili CSS consentiti con i relativi valori da impostare per questo widget. Consulta la documentazione di style(). |
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.Slider\u003c/code\u003e widget enables users to interactively select a numeric value within a defined range, visually represented by a draggable slider.\u003c/p\u003e\n"],["\u003cp\u003eIt offers customization options like minimum/maximum values, step size, initial value, orientation, and an onChange callback to respond to user interactions.\u003c/p\u003e\n"],["\u003cp\u003eDevelopers can further tailor its appearance using custom CSS styles through the \u003ccode\u003estyle\u003c/code\u003e argument.\u003c/p\u003e\n"]]],["The `ui.Slider` component creates a draggable slider between a minimum (`min`) and maximum (`max`) numeric value. It displays the current `value` with a label, adjustable by a defined `step`. The `direction` can be horizontal or vertical. An optional `onChange` function triggers on value changes, passing the current value. The slider can be `disabled`, and `style` properties are customizable. Default values are provided for `min`, `max`, `value`, and `step`.\n"],null,["# ui.Slider\n\n\u003cbr /\u003e\n\nA draggable target that ranges linearly between two numeric values. The value of the slider is displayed as a label alongside it.\n\n\u003cbr /\u003e\n\n| Usage | Returns |\n|-----------------------------------------------------------------------------------------------------------------|-----------|\n| `ui.Slider(`*min* `, `*max* `, `*value* `, `*step* `, `*onChange* `, `*direction* `, `*disabled* `, `*style*`)` | ui.Slider |\n\n| Argument | Type | Details |\n|-------------|--------------------|------------------------------------------------------------------------------------------------------------------------------|\n| `min` | Number, optional | The minimum value. Defaults to 0. |\n| `max` | Number, optional | The maximum value. Defaults to 1. |\n| `value` | Number, optional | The initial value. Defaults to 0. |\n| `step` | Number, optional | The step size for the slider. Defaults to 0.01. |\n| `onChange` | Function, optional | A callback to fire when the slider's state changes. The callback is passed the slider's current value and the slider widget. |\n| `direction` | String, optional | The direction of the slider. One of 'horizontal' or 'vertical'. Defaults to 'horizontal'. |\n| `disabled` | Boolean, optional | Whether the slider is disabled. Defaults to false. |\n| `style` | Object, optional | An object of allowed CSS styles with their values to be set for this widget. See style() documentation. |"]]