Announcement: All noncommercial projects registered to use Earth Engine before April 15, 2025 must verify noncommercial eligibility to maintain Earth Engine access.
Stay organized with collections
Save and categorize content based on your preferences.
Controls how gestures are handled on the map.
See https://developers.google.com/maps/documentation/javascript/reference/map#MapOptions.gestureHandling.
Usage
Returns
Map.setGestureHandling(option)
Argument
Type
Details
this: ui.map
ui.Map
The ui.Map instance.
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.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-02-20 UTC."],[[["Defines how users interact with the map through gestures like scrolling, panning, and zooming."],["Offers four options: \"cooperative\", \"greedy\", \"none\", and the default \"auto\", to control gesture behavior."],["\"Cooperative\" mode prioritizes page scrolling over map interaction for single-finger gestures, while \"greedy\" mode prioritizes map interactions for all gestures."],["Allows developers to disable all gestures with the \"none\" option or let the map automatically determine the best gesture handling based on context with \"auto\"."],["Can be set using the `Map.setGestureHandling(option)` method, where 'option' is one of the allowed string values."]]],[]]