Class protos.google.maps.routing.v2.Routes (0.3.0)

Represents a Routes

Inheritance

$protobuf.rpc.Service > protos.google.maps.routing.v2.Routes

Package

@googlemaps/routing

Constructors

(constructor)(rpcImpl, requestDelimited, responseDelimited)

constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean);

Constructs a new Routes service.

Parameters
NameDescription
rpcImpl $protobuf.RPCImpl

RPC implementation

requestDelimited boolean

Whether requests are length-delimited

responseDelimited boolean

Whether responses are length-delimited

Methods

computeRouteMatrix(request, callback)

public computeRouteMatrix(request: google.maps.routing.v2.IComputeRouteMatrixRequest, callback: google.maps.routing.v2.Routes.ComputeRouteMatrixCallback): void;

Calls ComputeRouteMatrix.

Parameters
NameDescription
request IComputeRouteMatrixRequest

ComputeRouteMatrixRequest message or plain object

callback google.maps.routing.v2.Routes.ComputeRouteMatrixCallback

Node-style callback called with the error, if any, and RouteMatrixElement

Returns
TypeDescription
void

computeRouteMatrix(request)

public computeRouteMatrix(request: google.maps.routing.v2.IComputeRouteMatrixRequest): Promise<google.maps.routing.v2.RouteMatrixElement>;

Calls ComputeRouteMatrix.

Parameter
NameDescription
request IComputeRouteMatrixRequest

ComputeRouteMatrixRequest message or plain object

Returns
TypeDescription
Promise<google.maps.routing.v2.RouteMatrixElement>

Promise

computeRoutes(request, callback)

public computeRoutes(request: google.maps.routing.v2.IComputeRoutesRequest, callback: google.maps.routing.v2.Routes.ComputeRoutesCallback): void;

Calls ComputeRoutes.

Parameters
NameDescription
request IComputeRoutesRequest

ComputeRoutesRequest message or plain object

callback google.maps.routing.v2.Routes.ComputeRoutesCallback

Node-style callback called with the error, if any, and ComputeRoutesResponse

Returns
TypeDescription
void

computeRoutes(request)

public computeRoutes(request: google.maps.routing.v2.IComputeRoutesRequest): Promise<google.maps.routing.v2.ComputeRoutesResponse>;

Calls ComputeRoutes.

Parameter
NameDescription
request IComputeRoutesRequest

ComputeRoutesRequest message or plain object

Returns
TypeDescription
Promise<google.maps.routing.v2.ComputeRoutesResponse>

Promise

create(rpcImpl, requestDelimited, responseDelimited)

public static create(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean): Routes;

Creates new Routes service using the specified rpc implementation.

Parameters
NameDescription
rpcImpl $protobuf.RPCImpl

RPC implementation

requestDelimited boolean

Whether requests are length-delimited

responseDelimited boolean

Whether responses are length-delimited

Returns
TypeDescription
Routes

RPC service. Useful where requests and/or responses are streamed.