공지사항:
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 | 문자열 | 지도에서 동작이 처리되는 방식을 제어하는 옵션입니다. 허용되는 값:
- '협력적': 스크롤 이벤트와 한 손가락 터치 동작으로 페이지를 스크롤하며 지도를 확대/축소하거나 이동하지 않습니다. 두 손가락 터치 동작으로 지도를 이동하고 확대/축소할 수 있습니다. Ctrl 키 또는 ⌘ 키를 누른 상태에서 스크롤하면 지도가 확대됩니다. 이 모드에서는 지도가 페이지와 협력합니다.
- 'greedy': 모든 터치 동작과 스크롤 이벤트로 지도를 이동하거나 확대/축소합니다.
- 'none': 사용자가 동작을 통해 지도를 화면 이동하거나 확대/축소할 수 없습니다.
- 'auto': (기본값) 페이지가 스크롤 가능인지 또는 iframe에 있는지에 따라 동작 처리가 협력적 또는 탐욕적입니다.
|
달리 명시되지 않는 한 이 페이지의 콘텐츠에는 Creative Commons Attribution 4.0 라이선스에 따라 라이선스가 부여되며, 코드 샘플에는 Apache 2.0 라이선스에 따라 라이선스가 부여됩니다. 자세한 내용은 Google Developers 사이트 정책을 참조하세요. 자바는 Oracle 및/또는 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. |"]]