@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
protectedapiKey: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()
protectedcheckResponse(response):CheckResponse
Parameters
• response: unknown
Returns
CheckResponse
Inherited from
ApiCaller.checkResponse
fillRequestFeatures()
abstractfillRequestFeatures(latlng):RoutingRequestWaypoint[]
Parameters
• latlng: SmartmapsPointExpression[]
Returns
fillRoutingParams()
abstractfillRoutingParams(options):TRoutingParams
Parameters
• options: Partial\<TOptions>
Returns
TRoutingParams
getRequestInfo()
protectedgetRequestInfo(request):Promise\<object>
Parameters
• request: string
Returns
Promise\<object>
bodyPart
bodyPart:
object
requestPart
requestPart:
Partial\<RequestInit>
url
url:
string
Inherited from
ApiCaller.getRequestInfo