Enum Mode
    
    
      
    
    
      
      コレクションでコンテンツを整理
    
    
      
      必要に応じて、コンテンツの保存と分類を行います。
    
  
  
      
    
  
  
  
  
  
    
  
  
    
    
    
モード
ルートの検索に使用する交通手段を表す列挙型。
列挙型を呼び出すには、その親クラス、名前、プロパティを呼び出します。たとえば、
Maps.Mode.DRIVING です。
 
プロパティ
| プロパティ | タイプ | 説明 | 
DRIVING | Enum | 道路を使った運転ルート。 | 
WALKING | Enum | 歩道または歩道を通る徒歩ルート(利用可能な場合)。 | 
BICYCLING | Enum | 自転車専用道路と優先道路(利用可能な場合)を使用した自転車ルート。 | 
TRANSIT | Enum | 公共交通機関のルート(利用可能な場合)を使用した乗換案内。このモードを使用する場合は、
出発時刻と到着時刻のどちらかです
// Log all available data for a public-transit trip.
const directions = Maps.newDirectionFinder()
                       .setOrigin('The Cloisters, New York, NY')
                       .setDestination('JFK airport, New York, NY')
                       .setMode(Maps.DirectionFinder.Mode.TRANSIT)
                       .setDepart(new Date())
                       .getDirections();
const route = directions.routes[0];
Logger.log(route);
 | 
 
 
  
  
  
    
  
 
  
    
    
      
       
    
    
  
  
  特に記載のない限り、このページのコンテンツはクリエイティブ・コモンズの表示 4.0 ライセンスにより使用許諾されます。コードサンプルは Apache 2.0 ライセンスにより使用許諾されます。詳しくは、Google Developers サイトのポリシーをご覧ください。Java は Oracle および関連会社の登録商標です。
  最終更新日 2025-07-26 UTC。
  
  
  
    
      [null,null,["最終更新日 2025-07-26 UTC。"],[],["The `Mode` enum defines travel methods for finding directions.  It includes `DRIVING`, `WALKING`, and `BICYCLING`, for road, pedestrian, and cycling routes respectively. `TRANSIT` offers public transit routes, requiring departure or arrival time specification. To use, reference as `Maps.Mode.PROPERTY`. An example is provided for setting a public transit route, by using `.setMode(Maps.DirectionFinder.Mode.TRANSIT)` and calling the `getDirections()` function.\n"]]