From a191b3f5ed50886ea1b7f7fd83799661d20c7b8b Mon Sep 17 00:00:00 2001 From: Esteban Franqueiro Date: Tue, 6 Feb 2018 14:10:51 -0300 Subject: [PATCH] The Waypoint constructor as-id doesn't work with newer versions of Leaflet --- src/L.Routing.TomTom.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/L.Routing.TomTom.js b/src/L.Routing.TomTom.js index 5e9eff8..cd61887 100644 --- a/src/L.Routing.TomTom.js +++ b/src/L.Routing.TomTom.js @@ -232,7 +232,7 @@ idx; wpIndices.push(0); - wps.push(new L.Routing.Waypoint(coordinates[0], waypoints[0].name)); + wps.push({ latLng: coordinates[0], name: waypoints[0].name }); for (i = 0; i < instructions.length; i++) { if (instructions[i].type === "WaypointReached") {