Zadbaj o dobrą organizację dzięki kolekcji
Zapisuj i kategoryzuj treści zgodnie ze swoimi preferencjami.
Rejestruje wywołanie zwrotne, które jest uruchamiane po wybraniu kształtu.
Zwraca identyfikator, który można przekazać do funkcji unlisten(), aby wyrejestrować wywołanie zwrotne.
Wykorzystanie
Zwroty
DrawingTools.onSelect(callback)
Ciąg znaków
Argument
Typ
Szczegóły
to: ui.map.drawingtools
ui.Map.DrawingTools
Instancja ui.Map.DrawingTools.
callback
Funkcja
Funkcja zwrotna, która ma zostać wywołana po wybraniu kształtu. Funkcja zwrotna otrzymuje 3 parametry: wybraną geometrię ee.Geometry, warstwę GeometryLayer, do której należy wybrana geometria, oraz widżet ui.Map.DrawingTools, z którym powiązany jest detektor zdarzeń.
[[["Łatwo zrozumieć","easyToUnderstand","thumb-up"],["Rozwiązało to mój problem","solvedMyProblem","thumb-up"],["Inne","otherUp","thumb-up"]],[["Brak potrzebnych mi informacji","missingTheInformationINeed","thumb-down"],["Zbyt skomplikowane / zbyt wiele czynności do wykonania","tooComplicatedTooManySteps","thumb-down"],["Nieaktualne treści","outOfDate","thumb-down"],["Problem z tłumaczeniem","translationIssue","thumb-down"],["Problem z przykładami/kodem","samplesCodeIssue","thumb-down"],["Inne","otherDown","thumb-down"]],["Ostatnia aktualizacja: 2025-07-26 UTC."],[[["Registers a callback function that is triggered when a shape is selected on the map."],["Returns a unique ID that can be used to unregister the callback function using the `unlisten()` method."],["The callback function receives the selected geometry, its corresponding layer, and the DrawingTools widget as arguments."]]],["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"]]