A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://developers.google.com/apps-script/reference/maps/mode below:

Enum Mode | Apps Script

Enum Mode

Stay organized with collections Save and categorize content based on your preferences.

Mode

An enum representing the mode of travel to use when finding directions.

To call an enum, you call its parent class, name, and property. For example, Maps.Mode.DRIVING.

Properties Property Type Description DRIVING Enum Driving directions via roads. WALKING Enum Walking directions via pedestrian paths and sidewalks (where available). BICYCLING Enum Bicycling directions via bicycle paths and preferred streets (where available). TRANSIT Enum Transit directions via public transit routes (where available). This mode requires that you set either the departure or arrival time.
// 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);

Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2024-11-26 UTC.

[[["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-11-26 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"]]


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4