Creates an instance of MPDirectionsRenderer.
Private Optional _defaultPrivate Optional eventEvent handler.
Private Optional onListener for leg selection events.
Signals that guidance on the current route has finished, either because the user arrived or because they ended navigation.
Has no effect when no route is set, or when guidance on the current route has already finished. clear finishes guidance implicitly, so there is no need to call both.
Optional usagePercentage: numberHow much of the route was travelled, from 0 to 100. Values outside that range are clamped. Omit it to let the SDK derive the figure from the route's own progress.
Gets the currently effective styling and camera options of the rendered route.
Each option is resolved as: the value set with setOptions, then the solution level default configured in the CMS, then the SDK's built-in default. An option reading back as undefined has no default in force for it yet.
Set the fitmode of the camera, when displaying route elements on the map.
Set the default icon for route stops.
Set a listener, which will be invoked when a new leg has been selected.
This is used for when the forward/back markers are selected on the map.
Optional listener: OnLegSelectedListenerSet the styling and camera options of the rendered route.
Applies immediately, restyling an already rendered route in place. Every option resolves on its own, in this order: the value set here, then the solution level default configured in the CMS, then the SDK's built-in default. Options left unset are therefore inherited rather than reset.
Set the colors of the route polyline.
Colors are given as hex strings (e.g. "#3071D9").
the primary color (animated polyline)
the secondary color (static polyline)
Use setOptions with animatedOverlayColor (foreground) and strokeColor (background) instead.
Set a route to be rendered. This also resets the selected leg and step indices to 0.
Optional route: MPRouteOptional stopIcons: Map<number, RouteStopIconConfig> = nullOptional legIndex: number = 0Overwrites the starting leg index, when rendering the route
Generated using TypeDoc
Renders a MPRoute on the map.
Export