공지사항:
2025년 4월 15일 전에 Earth Engine 사용을 위해 등록된 모든 비상업용 프로젝트는 Earth Engine 액세스를 유지하기 위해
비상업용 자격 요건을 인증해야 합니다.
Map.setGestureHandling
컬렉션을 사용해 정리하기
내 환경설정을 기준으로 콘텐츠를 저장하고 분류하세요.
지도에서 동작이 처리되는 방식을 제어합니다.
https://developers.google.com/maps/documentation/javascript/reference/map#MapOptions.gestureHandling을 참고하세요.
사용 | 반환 값 |
---|
Map.setGestureHandling(option) | |
인수 | 유형 | 세부정보 |
---|
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\u003e\u003ccode\u003egestureHandling\u003c/code\u003e option controls how users interact with the map through gestures like scrolling and touch.\u003c/p\u003e\n"],["\u003cp\u003eOptions include "cooperative", "greedy", "none", and the default "auto", each affecting how the map responds to user input.\u003c/p\u003e\n"],["\u003cp\u003e"cooperative" allows page scrolling with one finger and map interaction with two fingers, while "greedy" makes all gestures control the map.\u003c/p\u003e\n"],["\u003cp\u003e"none" disables map panning and zooming via gestures, whereas "auto" intelligently switches between "cooperative" and "greedy" based on context.\u003c/p\u003e\n"],["\u003cp\u003eRefer to the Google Maps documentation for detailed information and implementation instructions.\u003c/p\u003e\n"]]],["The `Map.setGestureHandling(option)` method controls map gesture behavior. The `option` argument, a string, determines how the map interacts with user gestures. \"cooperative\" mode allows page scrolling with single-finger or scroll events while reserving two-finger gestures for map manipulation. \"greedy\" mode assigns all touch and scroll actions to the map. \"none\" disables map panning/zooming via gestures. \"auto\" (default) switches between cooperative and greedy modes.\n"],null,["# 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| `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. |"]]