//Logallavailabledataforapublic-transittrip.vardirections=Maps.newDirectionFinder().setOrigin('The Cloisters, New York, NY').setDestination('JFK airport, New York, NY').setMode(Maps.DirectionFinder.Mode.TRANSIT).setDepart(newDate()).getDirections();varroute=directions.routes[0];Logger.log(route);
[[["เข้าใจง่าย","easyToUnderstand","thumb-up"],["แก้ปัญหาของฉันได้","solvedMyProblem","thumb-up"],["อื่นๆ","otherUp","thumb-up"]],[["ไม่มีข้อมูลที่ฉันต้องการ","missingTheInformationINeed","thumb-down"],["ซับซ้อนเกินไป/มีหลายขั้นตอนมากเกินไป","tooComplicatedTooManySteps","thumb-down"],["ล้าสมัย","outOfDate","thumb-down"],["ปัญหาเกี่ยวกับการแปล","translationIssue","thumb-down"],["ตัวอย่าง/ปัญหาเกี่ยวกับโค้ด","samplesCodeIssue","thumb-down"],["อื่นๆ","otherDown","thumb-down"]],["อัปเดตล่าสุด 2024-08-21 UTC"],[[["`Maps.Mode` is an enum used to specify the mode of transportation for directions."],["The available modes are `DRIVING`, `WALKING`, `BICYCLING`, and `TRANSIT`."],["`TRANSIT` mode requires specifying either departure or arrival time."],["Each mode utilizes specific routes like roads, pedestrian paths, bicycle paths, or public transit routes as appropriate."]]],["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"]]