Skip to content

@smartmaps/routingDocs


@smartmaps/routing / RoutingMatrix

Class: RoutingMatrix

Extends

Constructors

new RoutingMatrix()

new RoutingMatrix(apiKey, options): RoutingMatrix

Parameters

apiKey: string

options: Partial\<RoutingOptions> = {}

Returns

RoutingMatrix

Inherited from

RoutingBase.constructor

Properties

apiKey

protected apiKey: string

Inherited from

RoutingBase.apiKey


options

options: RoutingOptions

Inherited from

RoutingBase.options

Methods

calcRoute()

calcRoute(latlngs, options): Promise\<RoutingMatrixResponseCollection>

Parameters

latlngs: SmartmapsPointExpression[]

options: Partial\<RoutingOptions & object> = {}

Returns

Promise\<RoutingMatrixResponseCollection>

Inherited from

RoutingBase.calcRoute


checkResponse()

protected checkResponse(response): CheckResponse

Parameters

response: unknown

Returns

CheckResponse

Inherited from

RoutingBase.checkResponse


fillRequestFeatures()

fillRequestFeatures(latlngs): (Feature\<Point, GeoJsonProperties> | Feature\<MultiPoint, GeoJsonProperties>)[]

Parameters

latlngs: SmartmapsPointExpression[]

Returns

(Feature\<Point, GeoJsonProperties> | Feature\<MultiPoint, GeoJsonProperties>)[]

Overrides

RoutingBase.fillRequestFeatures


fillRoutingParams()

fillRoutingParams(options): RoutingRequestParams

Parameters

options: Partial\<RoutingOptions>

Returns

RoutingRequestParams

Overrides

RoutingBase.fillRoutingParams


getRequestInfo()

protected getRequestInfo(request): Promise\<object>

Parameters

request: string

Returns

Promise\<object>

bodyPart

bodyPart: object

requestPart

requestPart: Partial\<RequestInit>

url

url: string

Inherited from

RoutingBase.getRequestInfo