إشعار: يجب
إثبات أهلية جميع المشاريع غير التجارية المسجّلة لاستخدام Earth Engine قبل
15 أبريل 2025 من أجل الحفاظ على إمكانية الوصول إلى Earth Engine.
ui.Map.setGestureHandling
تنظيم صفحاتك في مجموعات
يمكنك حفظ المحتوى وتصنيفه حسب إعداداتك المفضّلة.
تتحكّم هذه السمة في كيفية التعامل مع الإيماءات على الخريطة.
يمكنك الاطّلاع على https://developers.google.com/maps/documentation/javascript/reference/map#MapOptions.gestureHandling.
الاستخدام | المرتجعات |
---|
Map.setGestureHandling(option) | |
الوسيطة | النوع | التفاصيل |
---|
هذا: ui.map | ui.Map | مثيل ui.Map. |
option | سلسلة | الخيار الذي يتحكّم في كيفية التعامل مع الإيماءات على الخريطة القيم المسموح بها:
- "تعاونية": تؤدي أحداث التمرير وإيماءات اللمس بإصبع واحد إلى تمرير الصفحة، ولا تؤدي إلى تكبير الخريطة أو تحريكها. تتيح إيماءات اللمس بإصبعين تحريك الخريطة وتكبيرها أو تصغيرها. يؤدي تمرير الأحداث مع الضغط على مفتاح Ctrl أو مفتاح ⌘ إلى تكبير الخريطة. في هذا الوضع، تتفاعل الخريطة مع الصفحة.
- "greedy": يؤدي تحريك إصبع واحد أو أكثر على الشاشة إلى تحريك الخريطة أو تكبيرها أو تصغيرها.
- "none": لا يمكن للمستخدم تحريك الخريطة أو تكبيرها أو تصغيرها باستخدام الإيماءات.
- "تلقائي": (الإعداد التلقائي) تكون معالجة الإيماءات تعاونية أو شرهة، وذلك حسب ما إذا كانت الصفحة قابلة للتمرير أو في إطار iframe.
|
إنّ محتوى هذه الصفحة مرخّص بموجب ترخيص Creative Commons Attribution 4.0 ما لم يُنصّ على خلاف ذلك، ونماذج الرموز مرخّصة بموجب ترخيص Apache 2.0. للاطّلاع على التفاصيل، يُرجى مراجعة سياسات موقع Google Developers. إنّ Java هي علامة تجارية مسجَّلة لشركة Oracle و/أو شركائها التابعين.
تاريخ التعديل الأخير: 2025-07-26 (حسب التوقيت العالمي المتفَّق عليه)
[null,null,["تاريخ التعديل الأخير: 2025-07-26 (حسب التوقيت العالمي المتفَّق عليه)"],[[["\u003cp\u003eDefines how users interact with the map through gestures like scrolling, panning, and zooming.\u003c/p\u003e\n"],["\u003cp\u003eOffers four options: "cooperative", "greedy", "none", and the default "auto", to control gesture behavior.\u003c/p\u003e\n"],["\u003cp\u003e"Cooperative" mode prioritizes page scrolling over map interaction for single-finger gestures, while "greedy" mode prioritizes map interactions for all gestures.\u003c/p\u003e\n"],["\u003cp\u003eAllows developers to disable all gestures with the "none" option or let the map automatically determine the best gesture handling based on context with "auto".\u003c/p\u003e\n"],["\u003cp\u003eCan be set using the \u003ccode\u003eMap.setGestureHandling(option)\u003c/code\u003e method, where 'option' is one of the allowed string values.\u003c/p\u003e\n"]]],[],null,["# ui.Map.setGestureHandling\n\n\u003cbr /\u003e\n\nControls how gestures are handled on the map.\n\n\u003cbr /\u003e\n\nSee https://developers.google.com/maps/documentation/javascript/reference/map#MapOptions.gestureHandling.\n\n| Usage | Returns |\n|----------------------------------|---------|\n| Map.setGestureHandling`(option)` | |\n\n| Argument | Type | Details |\n|----------------|--------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| this: `ui.map` | ui.Map | The ui.Map instance. |\n| `option` | String | The option that controls how gestures are handled on the map. Allowed values: - \"cooperative\": Scroll events and one-finger touch gestures scroll the page, and do not zoom or pan the map. Two-finger touch gestures pan and zoom the map. Scroll events with a ctrl key or ⌘ key pressed zoom the map. In this mode the map cooperates with the page. - \"greedy\": All touch gestures and scroll events pan or zoom the map. - \"none\": The map cannot be panned or zoomed by user gestures. - \"auto\": (default) Gesture handling is either cooperative or greedy, depending on whether the page is scrollable or in an iframe. |"]]