Get a Maps Demo Key: Try out select Maps JavaScript API and Places UI Kit features at no cost with a Maps Demo Key—no billing information required.

Get a two-wheeled vehicle route

European Economic Area (EEA) developers

Two-wheeled refers to two-wheeled motorized vehicles (for example, motorcycles). The two-wheeler travel mode differs from the bicycle travel mode, which is a human-powered travel mode.

Use the travelMode property of a request to specify the mode.

Specify the two-wheeler travel mode

Specify the TWO_WHEELER travel mode in your computeRoute request, as shown in the following example:

constrequest={
origin:'Mountain View, CA',
destination:'San Francisco, CA',
travelMode:'TWO_WHEELER',
fields:['path'],
};

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 2026年09月01日 UTC.