公告:凡是在 
2025 年 4 月 15 日前註冊使用 Earth Engine 的非商業專案,都必須
驗證非商業用途資格,才能繼續存取。如未在 2025 年 9 月 26 日前完成驗證,存取權可能會暫停。
  
        
 
       
     
  
  
  
    
  
  
  
    
      Map.setGestureHandling
    
    
      
    
    
      
      透過集合功能整理內容
    
    
      
      你可以依據偏好儲存及分類內容。
    
  
  
      
    
  
  
  
  
  
    
  
  
    
    
    
  
  
控管地圖上的手勢處理方式。
請參閱 https://developers.google.com/maps/documentation/javascript/reference/map#MapOptions.gestureHandling。
| 用量 | 傳回 | 
|---|
| Map.setGestureHandling(option) |  | 
| 引數 | 類型 | 詳細資料 | 
|---|
| option | 字串 | 這個選項可控制地圖上的手勢處理方式。允許的值: 
「合作」:捲動事件和單指觸控手勢會捲動頁面,不會縮放或平移地圖。雙指觸控手勢可平移及縮放地圖。按住 Ctrl 鍵或 ⌘ 鍵並捲動,即可縮放地圖。在此模式下,地圖會與網頁協同運作。「greedy」:所有觸控手勢和捲動事件都會平移或縮放地圖。「none」:使用者無法透過手勢平移或縮放地圖。「auto」:(預設) 視網頁是否可捲動或位於 iframe 中,手勢處理方式為合作或貪婪。 | 
  
  
  
  
  
 
  
    
    
      
       
    
    
  
  
  除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
  上次更新時間:2025-07-26 (世界標準時間)。
  
  
  
    
      [null,null,["上次更新時間:2025-07-26 (世界標準時間)。"],[],["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"]]