Route3DElement class
class google.maps.routes
. Route3DElement
extends HTMLElement
implements Route3DElementOptions
library "routes"
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 " internal-usage-attribution-ids=" space separated strings " origin=" lat,lng " routing-preference=" value-name " travel-mode=" value-name "> </gmp-route-3d>
const { Route3DElement } = await google . maps . importLibrary ( "routes" );
Constructor
Route3DElement([options])
-
options: Route3DElementOptions optional
Route3DElement
with the options specified.Properties
boolean optional
Output type:
boolean
false
autofits-camera
ComputeRoutesRequest.departureTime
.departure-time="####-##-##T##:##Z"
string| LatLng
| LatLngLiteral
| LatLngAltitude
| LatLngAltitudeLiteral
| Place
optional
Output type:
string| LatLng
| LatLngLiteral
| LatLngAltitude
| LatLngAltitudeLiteral
| Place
optional
-
destination="lat,lng" -
destination="places/###" -
destination="address"
FallbackInfo
optional
GeocodingResults
optional
string| LatLng
| LatLngLiteral
| LatLngAltitude
| LatLngAltitudeLiteral
| Place
optional
Output type:
string| LatLng
| LatLngLiteral
| LatLngAltitude
| LatLngAltitudeLiteral
| Place
optional
-
origin="lat,lng" -
origin="places/###" -
origin="address"
RoutingPreference
specified, and use traffic-specific coloring.routing-preference="value-name"
travel-mode="value-name"
Methods |
|
|---|---|
Inherited:
addEventListener
, removeEventListener
|
Events
function(routeInitializationErrorEvent)
-
routeInitializationErrorEvent: Event optional
Route3DElementOptions interface
interface google.maps.routes
. Route3DElementOptions
Route3DElementOptions object used to define the properties that can be set on a Route3DElement.
Properties |
|
|---|---|
autofitsCamera
optional |
Type:
boolean optional
Whether or not to opt into automatically fitting the camera to the route.
|
departureTime
optional |
Type:
Date
optional
|
destination
optional |
Type:
string| LatLng
| LatLngLiteral
| LatLngAltitude
| LatLngAltitudeLiteral
| Place
optional
|
internalUsageAttributionIds
optional |
Type:
Iterable
<string> optional
Identifiers used to attribute calls to specific packages or OSS libraries.
|
origin
optional |
Type:
string| LatLng
| LatLngLiteral
| LatLngAltitude
| LatLngAltitudeLiteral
| Place
optional
|
routingPreference
optional |
Type:
RoutingPreference
optional
|
travelMode
optional |
Type:
TravelMode
optional
|

