@smartmaps/routing • Docs
@smartmaps/routing / RoutingBase
Class: abstract
RoutingBase\<TOptions, TResponseCollection, TRoutingParams>
Extends
ApiCaller
Extended by
Type Parameters
• TOptions extends RoutingOptions
• TResponseCollection extends FeatureCollection
• TRoutingParams extends RoutingRequestParams
Constructors
new RoutingBase()
new RoutingBase\<
TOptions
,TResponseCollection
,TRoutingParams
>(apiKey
,options
):RoutingBase
\<TOptions
,TResponseCollection
,TRoutingParams
>
Parameters
• apiKey: string
• options: Partial
\<TOptions
> = {}
Returns
RoutingBase
\<TOptions
, TResponseCollection
, TRoutingParams
>
Overrides
ApiCaller.constructor
Properties
apiKey
protected
apiKey:string
Inherited from
ApiCaller.apiKey
options
options:
TOptions
Methods
calcRoute()
calcRoute(
latlngs
,options
):Promise
\<TResponseCollection
>
Parameters
• latlngs: SmartmapsPointExpression
[]
• options: Partial
\<TOptions
& object
> = {}
Returns
Promise
\<TResponseCollection
>
checkResponse()
protected
checkResponse(response
):CheckResponse
Parameters
• response: unknown
Returns
CheckResponse
Inherited from
ApiCaller.checkResponse
fillRequestFeatures()
abstract
fillRequestFeatures(latlng
):RoutingRequestWaypoint
[]
Parameters
• latlng: SmartmapsPointExpression
[]
Returns
fillRoutingParams()
abstract
fillRoutingParams(options
):TRoutingParams
Parameters
• options: Partial
\<TOptions
>
Returns
TRoutingParams
getRequestInfo()
protected
getRequestInfo(request
):Promise
\<object
>
Parameters
• request: string
Returns
Promise
\<object
>
bodyPart
bodyPart:
object
requestPart
requestPart:
Partial
\<RequestInit
>
url
url:
string
Inherited from
ApiCaller.getRequestInfo