Anúncio: todos os projetos não comerciais registrados para usar o Earth Engine antes de
15 de abril de 2025 precisam
verificar a qualificação não comercial para manter o acesso ao Earth Engine.
ui.Map.DrawingTools.onSelect
Mantenha tudo organizado com as coleções
Salve e categorize o conteúdo com base nas suas preferências.
Registra um callback que é disparado quando uma forma é selecionada.
Retorna um ID que pode ser transmitido para unlisten() para cancelar o registro da callback.
Uso | Retorna |
---|
DrawingTools.onSelect(callback) | String |
Argumento | Tipo | Detalhes |
---|
isso: ui.map.drawingtools | ui.Map.DrawingTools | A instância ui.Map.DrawingTools. |
callback | Função | O callback a ser disparado quando uma forma é selecionada. O callback recebe três parâmetros: o ee.Geometry selecionado, o GeometryLayer a que a geometria selecionada pertence e o widget ui.Map.DrawingTools a que o listener de eventos está vinculado. |
Exceto em caso de indicação contrária, o conteúdo desta página é licenciado de acordo com a Licença de atribuição 4.0 do Creative Commons, e as amostras de código são licenciadas de acordo com a Licença Apache 2.0. Para mais detalhes, consulte as políticas do site do Google Developers. Java é uma marca registrada da Oracle e/ou afiliadas.
Última atualização 2025-07-26 UTC.
[null,null,["Última atualização 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. |"]]