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.Map.DrawingTools.onSelect
Mantieni tutto organizzato con le raccolte
Salva e classifica i contenuti in base alle tue preferenze.
Registra un callback che viene attivato quando viene selezionata una forma.
Restituisce un ID che può essere passato a unlisten() per annullare la registrazione del callback.
Utilizzo | Resi |
---|
DrawingTools.onSelect(callback) | Stringa |
Argomento | Tipo | Dettagli |
---|
questo: ui.map.drawingtools | ui.Map.DrawingTools | L'istanza ui.Map.DrawingTools. |
callback | Funzione | Il callback da attivare quando viene selezionata una forma. Il callback riceve tre parametri: ee.Geometry selezionato, GeometryLayer a cui appartiene la geometria selezionata e il widget ui.Map.DrawingTools a cui è associato il listener di eventi. |
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\u003eRegisters a callback function that is triggered when a shape is selected on the map.\u003c/p\u003e\n"],["\u003cp\u003eReturns a unique ID that can be used to unregister the callback function using the \u003ccode\u003eunlisten()\u003c/code\u003e method.\u003c/p\u003e\n"],["\u003cp\u003eThe callback function receives the selected geometry, its corresponding layer, and the DrawingTools widget as arguments.\u003c/p\u003e\n"]]],["Registers a callback function triggered when a shape is selected. The function takes a callback as input. It returns a string ID for unregistering the callback later. The callback function receives three parameters: the selected geometry, its associated layer, and the `ui.Map.DrawingTools` instance. The `ui.Map.DrawingTools` is the instance on which the function is being called.\n"],null,["# ui.Map.DrawingTools.onSelect\n\n\u003cbr /\u003e\n\nRegisters a callback that's fired when a shape 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| DrawingTools.onSelect`(callback)` | String |\n\n| Argument | Type | Details |\n|-----------------------------|---------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| this: `ui.map.drawingtools` | ui.Map.DrawingTools | The ui.Map.DrawingTools instance. |\n| `callback` | Function | The callback to fire when a shape is selected. The callback is passed three parameters: the selected ee.Geometry, the GeometryLayer to which the selected geometry belongs, and the ui.Map.DrawingTools widget that the event listener is bound to. |"]]