Skip to content

Commit

Permalink
fix: clear route with events
Browse files Browse the repository at this point in the history
  • Loading branch information
oterral committed Nov 19, 2024
1 parent 1cd8a04 commit 6fca3e7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/ol/controls/RoutingControl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ export type RoutingControlOptions = {
useRawViaPoints?: boolean;
} & Options;

export type AbotControllersByGraph = Record<string, AbortController>;
export type AbortControllersByGraph = Record<string, AbortController>;

// Examples for a single hop:
// basel sbb a station named "basel sbb"
Expand Down Expand Up @@ -432,7 +432,7 @@ class RoutingControl extends Control {
drawRoute() {
/* Calls RoutingAPI to draw a route using the viaPoints array */
this.abortRequests();
this.routingLayer?.getSource()?.clear(true);
this.routingLayer?.getSource()?.clear();

if (!this.viaPoints.length) {
return null;
Expand Down

0 comments on commit 6fca3e7

Please sign in to comment.