ui.Map.setGestureHandling

Controls how gestures are handled on the map.

See https://developers.google.com/maps/documentation/javascript/reference/map#MapOptions.gestureHandling.

UsageReturns
Map.setGestureHandling(option)
ArgumentTypeDetails
this: ui.mapui.MapThe ui.Map instance.
optionStringThe 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.