إشعار: يجب
إثبات أهلية جميع المشاريع غير التجارية المسجّلة لاستخدام Earth Engine قبل
15 أبريل 2025 من أجل الحفاظ على إمكانية الوصول إلى Earth Engine.
ui.Map.DrawingTools.onSelect
تنظيم صفحاتك في مجموعات
يمكنك حفظ المحتوى وتصنيفه حسب إعداداتك المفضّلة.
تسجّل هذه السمة دالة ردّ يتم تشغيلها عند اختيار شكل.
تعرض هذه الطريقة رقم تعريف يمكن تمريره إلى unlisten() لإلغاء تسجيل وظيفة معاودة الاتصال.
الاستخدام | المرتجعات |
---|
DrawingTools.onSelect(callback) | سلسلة |
الوسيطة | النوع | التفاصيل |
---|
هذا: ui.map.drawingtools | ui.Map.DrawingTools | مثيل ui.Map.DrawingTools |
callback | الوظيفة | الدالة التي سيتم تنفيذها عند اختيار شكل. يتم تمرير ثلاث مَعلمات إلى دالة معاودة الاتصال: ee.Geometry المحدّد وGeometryLayer الذي ينتمي إليه الشكل الهندسي المحدّد وأداة ui.Map.DrawingTools التي يرتبط بها معالج الأحداث. |
إنّ محتوى هذه الصفحة مرخّص بموجب ترخيص Creative Commons Attribution 4.0 ما لم يُنصّ على خلاف ذلك، ونماذج الرموز مرخّصة بموجب ترخيص Apache 2.0. للاطّلاع على التفاصيل، يُرجى مراجعة سياسات موقع Google Developers. إنّ Java هي علامة تجارية مسجَّلة لشركة Oracle و/أو شركائها التابعين.
تاريخ التعديل الأخير: 2025-07-26 (حسب التوقيت العالمي المتفَّق عليه)
[null,null,["تاريخ التعديل الأخير: 2025-07-26 (حسب التوقيت العالمي المتفَّق عليه)"],[[["\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. |"]]