お知らせ:
2025 年 4 月 15 日より前に Earth Engine の使用を登録したすべての非商用プロジェクトは、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 | 文字列 | 地図上でのジェスチャーの処理方法を制御するオプション。使用できる値:
- 「cooperative」: スクロール イベントと 1 本の指のタッチ操作でページがスクロールされ、地図のズームやパンは行われません。2 本の指でタッチ操作を行うと、地図のパンとズームができます。Ctrl キーまたは ⌘ キーを押しながらスクロールすると、地図が拡大されます。このモードでは、地図がページと連携します。
- 「greedy」: すべてのタッチ操作とスクロール イベントで地図のパンまたはズームが行われます。
- 「none」: ユーザーのジェスチャーで地図をパンまたはズームすることはできません。
- 「auto」(デフォルト): ページがスクロール可能かどうか、または iframe 内にあるかどうかに応じて、ジェスチャー処理が協調的または貪欲的になります。
|
特に記載のない限り、このページのコンテンツはクリエイティブ・コモンズの表示 4.0 ライセンスにより使用許諾されます。コードサンプルは Apache 2.0 ライセンスにより使用許諾されます。詳しくは、Google Developers サイトのポリシーをご覧ください。Java は Oracle および関連会社の登録商標です。
最終更新日 2025-07-26 UTC。
[null,null,["最終更新日 2025-07-26 UTC。"],[[["\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. |"]]