Optional
configuration: Partial<MapLibreGlDirectionsConfiguration>Protected
_hoverableProtected
_interactiveProtected
_waypointsA publicly-available abort-controller that allows to manually abort an ongoing routing-request.
Only exists (!== undefined
) when there's an ongoing routing-request.
direсtions.abortController.abort();
Allows user to switch to alternative routes while in non-interactive mode. Only takes effect when hoverable
is
true
.
Protected
buildProtected
Creates a
Optional
properties: Record<string, unknown>Protected
buildProtected
Builds the routing-request method, URL and payload based on the provided configuration and the waypoints' coordinates.
Optional
waypointsBearings: (undefined | [number, number])[]Protected
buildProtected
Creates route lines from the server response.
Each route line is an array of legs, where each leg is an array of segments. A segment is a
Protected
buildProtected
Creates a $
Protected
Readonly
configurationProtected
currentProtected
departProtected
dragProtected
highlightedProtected
highlightedProtected
hoverpointProtected
lastProtected
liveProtected
Readonly
mapProtected
Optional
noProtected
onProtected
onProtected
onProtected
onProtected
onProtected
profilesProtected
refreshProtected
routelinesProtected
selectedProtected
snappointsProtected
Optional
waypointProtected
Optional
waypointAllows hover effects in non-interactive mode. Can be set to true
while interactive
is false
for the features
to be highlighted when hovered over by the user. Does nothing when interactive
is true
.
The interactivity state of the instance. When true
, the user is allowed to interact with the features drawn on
the map and to add waypoints by clicking the map. Automatically set to false
whenever there's an ongoing
routing request.
Protected
snaplinesProtected
snappointsReturns all the waypoints' coordinates in the order they appear.
Synchronous analogue of setWaypoints.
Returns all the waypoints' bearings values or an empty array if the bearings
configuration option is not
enabled.
Sets the waypoints' bearings values. Does not produce any effect in case the bearings
configuration option is
disabled.
Protected
waypointsProtected
_addOptional
index: numberOptional
originalEvent: MapMouseEvent | MapTouchEventProtected
_removeOptional
originalEvent: MapMouseEvent | MapTouchEventAdds a waypoint at the specified coordinates to the map and re-fetches the routes.
The coordinates at which the waypoint should be added
Optional
index: numberThe index the waypoint should be inserted at. If omitted, the waypoint is inserted at the end
Resolved after the routing request has finished
Protected
assignProtected
deProtected
drawProtected
fetchProtected
fetchProtected
fireProtected
initProtected
liveUn-registers an event listener.
Registers an event listener.
Protected
onProtected
onProtected
onProtected
onProtected
onRegisters an event listener to be invoked only once.
Replaces all the waypoints with the specified ones and re-fetches the routes.
The coordinates at which the waypoints should be added
Profiles for fetching directions between waypoints.
Resolved after the routing request has finished
Generated using TypeDoc
The main class responsible for all the user interaction and for the routing itself.