Routes Widget
Route3DElement class
google.maps.routes.Route3DElement
class
extends HTMLElement
implements Route3DElementOptions
A web component for 3D route rendering. Currently support origin and destination parameters to render a polyline in 3D space in a 3D map.
<gmp-route-3d autofits-camera departure-time="####-##-##T##:##Z" destination="lat,lng" origin="lat,lng" routing-preference="value-name" travel-mode="value-name"> </gmp-route-3d>
const {Route3DElement} = await google.maps.importLibrary("routes");
Constructor | |
|---|---|
Route3DElement |
Parameters:
Creates a |
Properties | |
|---|---|
autofitsCamera
attr: autofits-camera |
Type: Default: If provided, the specified route will be made visible within the map viewport, alongside any other elements that have opted in. HTML attribute: |
departureTime
attr: departure-time |
Type: If provided, the route will be computed with the specified departure time. When specifying via HTML attribute, use the ISO 8601 format for reliable results across browsers. For information on usage requirements, see HTML attribute: |
destination
attr: destination |
Type: The destination of the route. HTML attribute:
|
origin
attr: origin |
Type: The origin of the route. HTML attribute:
|
routingPreference
attr: routing-preference |
Type: If provided, the route will be computed with traffic information along the route that's based on the HTML attribute: |
travelMode
attr: travel-mode |
Type: If provided, the polyline is based on the specified travel mode. HTML attribute: |
Methods | |
|---|---|
Inherited:
addEventListener,
removeEventListener
|